mirror of
git://erdgeist.org/opentracker
synced 2025-04-04 04:17:15 +08:00
udp first connect needs to be counted as a connection too
This commit is contained in:
parent
f07ec869d8
commit
45d34960b0
@ -605,6 +605,7 @@ static void handle_udp4( int64 serversocket ) {
|
|||||||
outpacket[0] = 0; outpacket[1] = inpacket[3];
|
outpacket[0] = 0; outpacket[1] = inpacket[3];
|
||||||
outpacket[2] = inpacket[0]; outpacket[3] = inpacket[1];
|
outpacket[2] = inpacket[0]; outpacket[3] = inpacket[1];
|
||||||
socket_send4( serversocket, static_outbuf, 16, remoteip, remoteport );
|
socket_send4( serversocket, static_outbuf, 16, remoteip, remoteport );
|
||||||
|
ot_overall_udp_successfulannounces++;
|
||||||
break;
|
break;
|
||||||
case 1: /* This is an announce action */
|
case 1: /* This is an announce action */
|
||||||
/* Minimum udp announce packet size */
|
/* Minimum udp announce packet size */
|
||||||
@ -640,6 +641,7 @@ static void handle_udp4( int64 serversocket ) {
|
|||||||
outpacket[2] = htonl( OT_CLIENT_REQUEST_INTERVAL_RANDOM );
|
outpacket[2] = htonl( OT_CLIENT_REQUEST_INTERVAL_RANDOM );
|
||||||
outpacket[3] = outpacket[4] = 0;
|
outpacket[3] = outpacket[4] = 0;
|
||||||
socket_send4( serversocket, static_outbuf, 20, remoteip, remoteport );
|
socket_send4( serversocket, static_outbuf, 20, remoteip, remoteport );
|
||||||
|
ot_overall_udp_successfulannounces++;
|
||||||
} else {
|
} else {
|
||||||
torrent = add_peer_to_torrent( hash, &peer );
|
torrent = add_peer_to_torrent( hash, &peer );
|
||||||
if( !torrent )
|
if( !torrent )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user