summaryrefslogtreecommitdiff
path: root/opentracker.c
diff options
context:
space:
mode:
Diffstat (limited to 'opentracker.c')
-rw-r--r--opentracker.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/opentracker.c b/opentracker.c
index ab3eace..47e6f8d 100644
--- a/opentracker.c
+++ b/opentracker.c
@@ -26,6 +26,8 @@
26#include "trackerlogic.h" 26#include "trackerlogic.h"
27#include "scan_urlencoded_query.h" 27#include "scan_urlencoded_query.h"
28 28
29unsigned long const OT_CLIENT_TIMEOUT = 15;
30
29static unsigned int ot_overall_connections = 0; 31static unsigned int ot_overall_connections = 0;
30static time_t ot_start_time; 32static time_t ot_start_time;
31static const unsigned int SUCCESS_HTTP_HEADER_LENGTH = 80; 33static const unsigned int SUCCESS_HTTP_HEADER_LENGTH = 80;
@@ -376,6 +378,7 @@ void help( char *name ) {
376 378
377int main( int argc, char **argv ) { 379int main( int argc, char **argv ) {
378 int s=socket_tcp4(); 380 int s=socket_tcp4();
381 tai6464 t;
379 unsigned long ip; 382 unsigned long ip;
380 char *serverip = NULL; 383 char *serverip = NULL;
381 char *serverdir = "."; 384 char *serverdir = ".";
@@ -439,6 +442,9 @@ allparsed:
439 { 442 {
440 byte_zero(h,sizeof(struct http_data)); 443 byte_zero(h,sizeof(struct http_data));
441 h->ip=ip; 444 h->ip=ip;
445 taia_now(&t);
446 taia_addsec(&t,&t,OT_CLIENT_TIMEOUT);
447 io_timeout(n,t);
442 io_setcookie(n,h); 448 io_setcookie(n,h);
443 ++ot_overall_connections; 449 ++ot_overall_connections;
444 } else 450 } else