diff options
| author | erdgeist <> | 2009-10-02 23:43:34 +0000 |
|---|---|---|
| committer | erdgeist <> | 2009-10-02 23:43:34 +0000 |
| commit | 9cced7eb887fe434174c5fccbb3a31aa9499578d (patch) | |
| tree | cbaaceb831f0c922dd9505fbea30c3a7484bae4d | |
| parent | ed1673eb10e98145759b4e778511593fde3cbe3a (diff) | |
Report connection duplication
| -rw-r--r-- | proxy.c | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -366,8 +366,10 @@ static void handle_read( int64 peersocket ) { | |||
| 366 | /* See, if we already have a connection to that peer */ | 366 | /* See, if we already have a connection to that peer */ |
| 367 | for( i=0; i<MAX_PEERS; ++i ) | 367 | for( i=0; i<MAX_PEERS; ++i ) |
| 368 | if( ( g_connections[i].state & FLAG_MASK ) == FLAG_CONNECTED && | 368 | if( ( g_connections[i].state & FLAG_MASK ) == FLAG_CONNECTED && |
| 369 | g_connections[i].tracker_id == tracker_id ) | 369 | g_connections[i].tracker_id == tracker_id ) { |
| 370 | fprintf( stderr, "Peer already connected. Closing connection.\n" ); | ||
| 370 | goto close_socket; | 371 | goto close_socket; |
| 372 | } | ||
| 371 | 373 | ||
| 372 | /* Also no need for soliloquy */ | 374 | /* Also no need for soliloquy */ |
| 373 | if( tracker_id == g_tracker_id ) | 375 | if( tracker_id == g_tracker_id ) |
