From 908649af9841b224d783bcf091fa3bb2e29dfd07 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Thu, 18 Jan 2007 13:06:49 +0000 Subject: [PATCH] From now the OT_CLIENT_TIMEOUT will be enforced, even if some data arrived inside this interval --- opentracker.c | 6 ------ trackerlogic.c | 4 ---- trackerlogic.h | 1 - 3 files changed, 11 deletions(-) diff --git a/opentracker.c b/opentracker.c index 270f6c1..1490177 100644 --- a/opentracker.c +++ b/opentracker.c @@ -388,7 +388,6 @@ void help( char *name ) { void handle_read( int64 clientsocket ) { struct http_data* h = io_getcookie( clientsocket ); int l = io_tryread( clientsocket, static_scratch, sizeof static_scratch ); - tai6464 t; if( l <= 0 ) { if( h ) { @@ -407,11 +406,6 @@ void handle_read( int64 clientsocket ) { httperror(clientsocket,h,"500 request too long","You sent too much headers"); else if ((l=header_complete(h))) httpresponse(clientsocket,h); - else { - taia_now(&t); - taia_addsec(&t,&t,OT_CLIENT_TIMEOUT); - io_timeout(clientsocket,t); - } } void handle_accept( int64 serversocket ) { diff --git a/trackerlogic.c b/trackerlogic.c index b044245..6c988df 100644 --- a/trackerlogic.c +++ b/trackerlogic.c @@ -393,10 +393,6 @@ void remove_peer_from_torrent( ot_hash *hash, ot_peer *peer ) { } } -void cleanup_torrents( void ) { - -} - int init_logic( char *serverdir ) { if( serverdir && chdir( serverdir ) ) { fprintf( stderr, "Could not chdir() to %s\n", serverdir ); diff --git a/trackerlogic.h b/trackerlogic.h index a46869a..413c10b 100644 --- a/trackerlogic.h +++ b/trackerlogic.h @@ -86,6 +86,5 @@ size_t return_peers_for_torrent( ot_torrent *torrent, unsigned int amount, char size_t return_scrape_for_torrent( ot_hash *hash, char *reply ); size_t return_stats_for_tracker( char *reply, int mode ); void remove_peer_from_torrent( ot_hash *hash, ot_peer *peer ); -void cleanup_torrents( void ); #endif