diff options
author | erdgeist <> | 2008-02-05 01:55:06 +0000 |
---|---|---|
committer | erdgeist <> | 2008-02-05 01:55:06 +0000 |
commit | cadf1803e1b36866a9f8a0e57d3b741360928928 (patch) | |
tree | d6ade7eba9f2886a59c1765880e20e0cf3d03f67 /trackerlogic.c | |
parent | 90184649d021120c1b181bc6a6fe602802a17ef4 (diff) |
Fix endianess issues, also obey number of peers requested in udp announces
Diffstat (limited to 'trackerlogic.c')
-rw-r--r-- | trackerlogic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/trackerlogic.c b/trackerlogic.c index f4bdf0b..fd6a6ee 100644 --- a/trackerlogic.c +++ b/trackerlogic.c | |||
@@ -304,8 +304,8 @@ exit_loop: | |||
304 | 304 | ||
305 | /* else { Handle UDP reply */ | 305 | /* else { Handle UDP reply */ |
306 | ((uint32_t*)reply)[2] = htonl( OT_CLIENT_REQUEST_INTERVAL_RANDOM ); | 306 | ((uint32_t*)reply)[2] = htonl( OT_CLIENT_REQUEST_INTERVAL_RANDOM ); |
307 | ((uint32_t*)reply)[3] = peer_list->peer_count - peer_list->seed_count; | 307 | ((uint32_t*)reply)[3] = htonl( peer_list->peer_count - peer_list->seed_count ); |
308 | ((uint32_t*)reply)[4] = peer_list->seed_count; | 308 | ((uint32_t*)reply)[4] = htonl( peer_list->seed_count); |
309 | 309 | ||
310 | mutex_bucket_unlock_by_hash( hash ); | 310 | mutex_bucket_unlock_by_hash( hash ); |
311 | return (size_t)20; | 311 | return (size_t)20; |