From e62887341649e16e72ce64f3bdea73a087287209 Mon Sep 17 00:00:00 2001 From: denis <> Date: Wed, 24 Jan 2007 20:48:25 +0000 Subject: workaround for some weird requests --- opentracker.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'opentracker.c') diff --git a/opentracker.c b/opentracker.c index c29a613..64beaa2 100644 --- a/opentracker.c +++ b/opentracker.c @@ -306,7 +306,8 @@ e400_param: port = htons( tmp ); OT_SETPORT ( &peer, &port ); } else if(!byte_diff(data,4,"left")) { size_t len = scan_urlencoded_query( &c, data = c, SCAN_SEARCHPATH_VALUE ); - if( ( len <= 0 ) || scan_fixed_int( data, len, &tmp ) ) goto e400_param; + if( len <= 0 ) goto e400_param; + if( scan_fixed_int( data, len, &tmp ) ) tmp = 0; if( !tmp ) OT_FLAG( &peer ) |= PEER_FLAG_SEEDING; } else scan_urlencoded_query( &c, NULL, SCAN_SEARCHPATH_VALUE ); @@ -547,8 +548,10 @@ void handle_accept( int64 serversocket ) { if( errno==EAGAIN ) io_eagain( serversocket ); +/* else carp( "socket_accept4" ); +*/ } void handle_timeouted( ) { -- cgit v1.2.3