summaryrefslogtreecommitdiff
path: root/trackerlogic.c
diff options
context:
space:
mode:
Diffstat (limited to 'trackerlogic.c')
-rw-r--r--trackerlogic.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/trackerlogic.c b/trackerlogic.c
index ff6f45a..c8576f6 100644
--- a/trackerlogic.c
+++ b/trackerlogic.c
@@ -416,9 +416,7 @@ size_t return_udp_scrape_for_torrent( ot_hash *hash, char *reply ) {
416 416
417 if( !exactmatch ) { 417 if( !exactmatch ) {
418 memset( reply, 0, 12); 418 memset( reply, 0, 12);
419 } 419 } else {
420 else
421 {
422 unsigned long *r = (unsigned long*) reply; 420 unsigned long *r = (unsigned long*) reply;
423 clean_peerlist( NOW, torrent->peer_list ); 421 clean_peerlist( NOW, torrent->peer_list );
424 422
@@ -426,9 +424,9 @@ size_t return_udp_scrape_for_torrent( ot_hash *hash, char *reply ) {
426 peers += torrent->peer_list->peers[i].size; 424 peers += torrent->peer_list->peers[i].size;
427 seeds += torrent->peer_list->seed_count[i]; 425 seeds += torrent->peer_list->seed_count[i];
428 } 426 }
429 r[0] = seeds; 427 r[0] = htonl( seeds );
430 r[1] = torrent->peer_list->downloaded; 428 r[1] = htonl( torrent->peer_list->downloaded );
431 r[2] = peers-seeds; 429 r[2] = htonl( peers-seeds );
432 } 430 }
433 return 12; 431 return 12;
434} 432}