diff options
author | denis <> | 2007-03-16 20:11:22 +0000 |
---|---|---|
committer | denis <> | 2007-03-16 20:11:22 +0000 |
commit | 36413e4853a02b7adbd192d362c4c091330e5e88 (patch) | |
tree | de948d6c9c3a49f994cceeea8a346a58926aa82e | |
parent | 45d34960b0ffee1b436da2a784ff4549c6333971 (diff) |
fix the stats a little for not accepting udp scrapes
-rw-r--r-- | opentracker.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/opentracker.c b/opentracker.c index 5b3a48d..5e8ebc1 100644 --- a/opentracker.c +++ b/opentracker.c | |||
@@ -595,7 +595,7 @@ static void handle_udp4( int64 serversocket ) { | |||
595 | r = socket_recv4( serversocket, static_inbuf, 8192, remoteip, &remoteport); | 595 | r = socket_recv4( serversocket, static_inbuf, 8192, remoteip, &remoteport); |
596 | 596 | ||
597 | ot_overall_udp_connections++; | 597 | ot_overall_udp_connections++; |
598 | 598 | ||
599 | /* Minimum udp tracker packet size, also catches error */ | 599 | /* Minimum udp tracker packet size, also catches error */ |
600 | if( r < 16 ) | 600 | if( r < 16 ) |
601 | return; | 601 | return; |
@@ -654,6 +654,10 @@ static void handle_udp4( int64 serversocket ) { | |||
654 | ot_overall_udp_successfulannounces++; | 654 | ot_overall_udp_successfulannounces++; |
655 | } | 655 | } |
656 | break; | 656 | break; |
657 | |||
658 | case 2: /* This is a scrape action */ | ||
659 | ot_overall_udp_connections--; // subtract again because we don't answer scrapes but it is also not an error | ||
660 | break; | ||
657 | } | 661 | } |
658 | } | 662 | } |
659 | 663 | ||