diff options
author | erdgeist <> | 2007-10-16 00:23:14 +0000 |
---|---|---|
committer | erdgeist <> | 2007-10-16 00:23:14 +0000 |
commit | 28d88e338032975b4b6fc3e0d6fd413b90c39596 (patch) | |
tree | 46ea9f1b3ff9ba319fa8452ae3109a9be6f38daf /trackerlogic.c | |
parent | 3dc470d67264a372102a6805c9ca242e00c5e0a5 (diff) |
Exclude empty torrents from full scrape, also try to shrink full scrape buffer after it is full
Diffstat (limited to 'trackerlogic.c')
-rw-r--r-- | trackerlogic.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/trackerlogic.c b/trackerlogic.c index 239efb8..37b3c4d 100644 --- a/trackerlogic.c +++ b/trackerlogic.c | |||
@@ -325,9 +325,11 @@ size_t return_fullscrape_for_tracker( char **reply ) { | |||
325 | peers += peer_list->peers[k].size; | 325 | peers += peer_list->peers[k].size; |
326 | seeds += peer_list->seed_count[k]; | 326 | seeds += peer_list->seed_count[k]; |
327 | } | 327 | } |
328 | *r++='2'; *r++='0'; *r++=':'; | 328 | if( peers ) { |
329 | memmove( r, hash, 20 ); r+=20; | 329 | *r++='2'; *r++='0'; *r++=':'; |
330 | r += sprintf( r, "d8:completei%zde10:downloadedi%zde10:incompletei%zdee", seeds, peer_list->downloaded, peers-seeds ); | 330 | memmove( r, hash, 20 ); r+=20; |
331 | r += sprintf( r, "d8:completei%zde10:downloadedi%zde10:incompletei%zdee", seeds, peer_list->downloaded, peers-seeds ); | ||
332 | } | ||
331 | } | 333 | } |
332 | } | 334 | } |
333 | 335 | ||