summaryrefslogtreecommitdiff
path: root/trackerlogic.c
diff options
context:
space:
mode:
Diffstat (limited to 'trackerlogic.c')
-rw-r--r--trackerlogic.c8
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