diff options
| author | erdgeist <> | 2007-01-18 13:06:49 +0000 |
|---|---|---|
| committer | erdgeist <> | 2007-01-18 13:06:49 +0000 |
| commit | 908649af9841b224d783bcf091fa3bb2e29dfd07 (patch) | |
| tree | 05855f6562c87353c86dae6504b638c8524b19d5 | |
| parent | 7c4fcdbd970220e903e63938a94257d5c70cafc9 (diff) | |
From now the OT_CLIENT_TIMEOUT will be enforced, even if some data arrived inside this interval
| -rw-r--r-- | opentracker.c | 6 | ||||
| -rw-r--r-- | trackerlogic.c | 4 | ||||
| -rw-r--r-- | trackerlogic.h | 1 |
3 files changed, 0 insertions, 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 ) { | |||
| 388 | void handle_read( int64 clientsocket ) { | 388 | void handle_read( int64 clientsocket ) { |
| 389 | struct http_data* h = io_getcookie( clientsocket ); | 389 | struct http_data* h = io_getcookie( clientsocket ); |
| 390 | int l = io_tryread( clientsocket, static_scratch, sizeof static_scratch ); | 390 | int l = io_tryread( clientsocket, static_scratch, sizeof static_scratch ); |
| 391 | tai6464 t; | ||
| 392 | 391 | ||
| 393 | if( l <= 0 ) { | 392 | if( l <= 0 ) { |
| 394 | if( h ) { | 393 | if( h ) { |
| @@ -407,11 +406,6 @@ void handle_read( int64 clientsocket ) { | |||
| 407 | httperror(clientsocket,h,"500 request too long","You sent too much headers"); | 406 | httperror(clientsocket,h,"500 request too long","You sent too much headers"); |
| 408 | else if ((l=header_complete(h))) | 407 | else if ((l=header_complete(h))) |
| 409 | httpresponse(clientsocket,h); | 408 | httpresponse(clientsocket,h); |
| 410 | else { | ||
| 411 | taia_now(&t); | ||
| 412 | taia_addsec(&t,&t,OT_CLIENT_TIMEOUT); | ||
| 413 | io_timeout(clientsocket,t); | ||
| 414 | } | ||
| 415 | } | 409 | } |
| 416 | 410 | ||
| 417 | void handle_accept( int64 serversocket ) { | 411 | 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 ) { | |||
| 393 | } | 393 | } |
| 394 | } | 394 | } |
| 395 | 395 | ||
| 396 | void cleanup_torrents( void ) { | ||
| 397 | |||
| 398 | } | ||
| 399 | |||
| 400 | int init_logic( char *serverdir ) { | 396 | int init_logic( char *serverdir ) { |
| 401 | if( serverdir && chdir( serverdir ) ) { | 397 | if( serverdir && chdir( serverdir ) ) { |
| 402 | fprintf( stderr, "Could not chdir() to %s\n", serverdir ); | 398 | 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 | |||
| 86 | size_t return_scrape_for_torrent( ot_hash *hash, char *reply ); | 86 | size_t return_scrape_for_torrent( ot_hash *hash, char *reply ); |
| 87 | size_t return_stats_for_tracker( char *reply, int mode ); | 87 | size_t return_stats_for_tracker( char *reply, int mode ); |
| 88 | void remove_peer_from_torrent( ot_hash *hash, ot_peer *peer ); | 88 | void remove_peer_from_torrent( ot_hash *hash, ot_peer *peer ); |
| 89 | void cleanup_torrents( void ); | ||
| 90 | 89 | ||
| 91 | #endif | 90 | #endif |
