mirror of
git://erdgeist.org/opentracker
synced 2025-01-28 23:56:25 +00:00
workaround for some weird requests
This commit is contained in:
parent
fd73f958c2
commit
e628873416
@ -306,7 +306,8 @@ e400_param:
|
|||||||
port = htons( tmp ); OT_SETPORT ( &peer, &port );
|
port = htons( tmp ); OT_SETPORT ( &peer, &port );
|
||||||
} else if(!byte_diff(data,4,"left")) {
|
} else if(!byte_diff(data,4,"left")) {
|
||||||
size_t len = scan_urlencoded_query( &c, data = c, SCAN_SEARCHPATH_VALUE );
|
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;
|
if( !tmp ) OT_FLAG( &peer ) |= PEER_FLAG_SEEDING;
|
||||||
} else
|
} else
|
||||||
scan_urlencoded_query( &c, NULL, SCAN_SEARCHPATH_VALUE );
|
scan_urlencoded_query( &c, NULL, SCAN_SEARCHPATH_VALUE );
|
||||||
@ -547,8 +548,10 @@ void handle_accept( int64 serversocket ) {
|
|||||||
|
|
||||||
if( errno==EAGAIN )
|
if( errno==EAGAIN )
|
||||||
io_eagain( serversocket );
|
io_eagain( serversocket );
|
||||||
|
/*
|
||||||
else
|
else
|
||||||
carp( "socket_accept4" );
|
carp( "socket_accept4" );
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle_timeouted( ) {
|
void handle_timeouted( ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user