diff options
author | denis <> | 2007-02-02 21:15:46 +0000 |
---|---|---|
committer | denis <> | 2007-02-02 21:15:46 +0000 |
commit | 222519fdffae6570602c5789c18b7ece6b00cba2 (patch) | |
tree | 9fbc492737d890deb20930804436043c702c6aba | |
parent | 929d375b973b2a30fbc75ea31595aa3f042d5cc2 (diff) |
fixed the last commit. now it really counts the scrapes and fullscrapes
-rw-r--r-- | opentracker.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/opentracker.c b/opentracker.c index 6d18719..a7d96d2 100644 --- a/opentracker.c +++ b/opentracker.c | |||
@@ -255,8 +255,6 @@ static void httpresponse( const int64 s, char *data ) { | |||
255 | 255 | ||
256 | /* Enough for http header + whole scrape string */ | 256 | /* Enough for http header + whole scrape string */ |
257 | if( !( reply_size = return_stats_for_tracker( SUCCESS_HTTP_HEADER_LENGTH + static_outbuf, mode ) ) ) HTTPERROR_500; | 257 | if( !( reply_size = return_stats_for_tracker( SUCCESS_HTTP_HEADER_LENGTH + static_outbuf, mode ) ) ) HTTPERROR_500; |
258 | |||
259 | ot_overall_successfulannounces++; | ||
260 | break; | 258 | break; |
261 | case 6: /* scrape ? */ | 259 | case 6: /* scrape ? */ |
262 | if( byte_diff( data, 6, "scrape") ) HTTPERROR_404; | 260 | if( byte_diff( data, 6, "scrape") ) HTTPERROR_404; |
@@ -284,11 +282,14 @@ SCRAPE_WORKAROUND: | |||
284 | /* Scanned whole query string, no hash means full scrape... you might want to limit that */ | 282 | /* Scanned whole query string, no hash means full scrape... you might want to limit that */ |
285 | if( !hash ) { | 283 | if( !hash ) { |
286 | if( !( reply_size = return_fullscrape_for_tracker( &reply ) ) ) HTTPERROR_500; | 284 | if( !( reply_size = return_fullscrape_for_tracker( &reply ) ) ) HTTPERROR_500; |
285 | ot_overall_successfulannounces++; | ||
287 | return sendmallocdata( s, reply, reply_size ); | 286 | return sendmallocdata( s, reply, reply_size ); |
288 | } | 287 | } |
289 | 288 | ||
290 | /* Enough for http header + whole scrape string */ | 289 | /* Enough for http header + whole scrape string */ |
291 | if( !( reply_size = return_scrape_for_torrent( hash, SUCCESS_HTTP_HEADER_LENGTH + static_outbuf ) ) ) HTTPERROR_500; | 290 | if( !( reply_size = return_scrape_for_torrent( hash, SUCCESS_HTTP_HEADER_LENGTH + static_outbuf ) ) ) HTTPERROR_500; |
291 | |||
292 | ot_overall_successfulannounces++; | ||
292 | break; | 293 | break; |
293 | case 8: | 294 | case 8: |
294 | if( byte_diff( data, 8, "announce" ) ) HTTPERROR_404; | 295 | if( byte_diff( data, 8, "announce" ) ) HTTPERROR_404; |