diff options
| author | erdgeist <> | 2009-02-20 12:31:55 +0000 |
|---|---|---|
| committer | erdgeist <> | 2009-02-20 12:31:55 +0000 |
| commit | 02078aba27b9ff150e8b02d9546a04525f056b33 (patch) | |
| tree | 034d7628c70e04b1ff84a32ca1d3e5106947026d | |
| parent | b2bd9f7d916d3edbf7be3ff3ac24db9befbff892 (diff) | |
Reset delta_torrentcount to zero on each pass
| -rw-r--r-- | trackerlogic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/trackerlogic.c b/trackerlogic.c index 182fa94..249a2a0 100644 --- a/trackerlogic.c +++ b/trackerlogic.c | |||
| @@ -269,11 +269,11 @@ size_t return_udp_scrape_for_torrent( ot_hash hash, char *reply ) { | |||
| 269 | size_t return_tcp_scrape_for_torrent( ot_hash *hash_list, int amount, char *reply ) { | 269 | size_t return_tcp_scrape_for_torrent( ot_hash *hash_list, int amount, char *reply ) { |
| 270 | char *r = reply; | 270 | char *r = reply; |
| 271 | int exactmatch, i; | 271 | int exactmatch, i; |
| 272 | int delta_torrentcount = 0; | ||
| 273 | 272 | ||
| 274 | r += sprintf( r, "d5:filesd" ); | 273 | r += sprintf( r, "d5:filesd" ); |
| 275 | 274 | ||
| 276 | for( i=0; i<amount; ++i ) { | 275 | for( i=0; i<amount; ++i ) { |
| 276 | int delta_torrentcount = 0; | ||
| 277 | ot_hash *hash = hash_list + i; | 277 | ot_hash *hash = hash_list + i; |
| 278 | ot_vector *torrents_list = mutex_bucket_lock_by_hash( *hash ); | 278 | ot_vector *torrents_list = mutex_bucket_lock_by_hash( *hash ); |
| 279 | ot_torrent *torrent = binary_search( hash, torrents_list->data, torrents_list->size, sizeof( ot_torrent ), OT_HASH_COMPARE_SIZE, &exactmatch ); | 279 | ot_torrent *torrent = binary_search( hash, torrents_list->data, torrents_list->size, sizeof( ot_torrent ), OT_HASH_COMPARE_SIZE, &exactmatch ); |
