summaryrefslogtreecommitdiff
path: root/proxy.c
diff options
context:
space:
mode:
authorerdgeist <>2009-10-02 23:43:34 +0000
committererdgeist <>2009-10-02 23:43:34 +0000
commit9cced7eb887fe434174c5fccbb3a31aa9499578d (patch)
treecbaaceb831f0c922dd9505fbea30c3a7484bae4d /proxy.c
parented1673eb10e98145759b4e778511593fde3cbe3a (diff)
Report connection duplication
Diffstat (limited to 'proxy.c')
-rw-r--r--proxy.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/proxy.c b/proxy.c
index 2ccffb4..1e15f84 100644
--- a/proxy.c
+++ b/proxy.c
@@ -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 )