summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <>2007-07-22 16:33:16 +0000
committererdgeist <>2007-07-22 16:33:16 +0000
commitd49c1d5960768ca0e29835acb10d6eefd316afb8 (patch)
tree94d239c926a5bbf22471d5b7c110d7c3dc454e21
parentafe966b64418c01e7ea09bb31c720365b0c4f395 (diff)
Fix endianess issue in /24 stats code
-rw-r--r--trackerlogic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/trackerlogic.c b/trackerlogic.c
index ee49eb7..9294ec4 100644
--- a/trackerlogic.c
+++ b/trackerlogic.c
@@ -656,8 +656,8 @@ size_t return_stats_for_slash24s( char *reply, size_t amount, ot_dword thresh )
656 ot_peer *peers = peer_list->peers[k].data; 656 ot_peer *peers = peer_list->peers[k].data;
657 size_t numpeers = peer_list->peers[k].size; 657 size_t numpeers = peer_list->peers[k].size;
658 for( l=0; l<numpeers; ++l ) 658 for( l=0; l<numpeers; ++l )
659 if( ++count[ (*(ot_dword*)(peers+l))>>8 ] == 65335 ) 659 if( ++count[ ntohl(*(ot_dword*)(peers+l))>>8 ] == 65335 )
660 count[ (*(ot_dword*)(peers+l))>>8 ] = 65334; 660 count[ ntohl(*(ot_dword*)(peers+l))>>8 ] = 65334;
661 } 661 }
662 } 662 }
663 } 663 }