summaryrefslogtreecommitdiff
path: root/src/ot_stats.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ot_stats.c')
-rw-r--r--src/ot_stats.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ot_stats.c b/src/ot_stats.c
index 9901081..c50d4e3 100644
--- a/src/ot_stats.c
+++ b/src/ot_stats.c
@@ -299,8 +299,8 @@ typedef struct {
299static int torrent_statter(ot_torrent *torrent, uintptr_t data) { 299static int torrent_statter(ot_torrent *torrent, uintptr_t data) {
300 torrent_stats *stats = (torrent_stats *)data; 300 torrent_stats *stats = (torrent_stats *)data;
301 stats->torrent_count++; 301 stats->torrent_count++;
302 stats->peer_count += torrent->peer_list6->peer_count + torrent->peer_list4->peer_count; 302 stats->peer_count += peerlist_peer_count(torrent->peer_list6) + peerlist_peer_count(torrent->peer_list4);
303 stats->seed_count += torrent->peer_list6->seed_count + torrent->peer_list4->seed_count; 303 stats->seed_count += peerlist_seed_count(torrent->peer_list6) + peerlist_seed_count(torrent->peer_list4);
304 return 0; 304 return 0;
305} 305}
306 306
@@ -343,8 +343,8 @@ void stats_top_txt(char **reply, const char *reply_end, size_t amount) {
343 ot_vector *torrents_list = mutex_bucket_lock(bucket); 343 ot_vector *torrents_list = mutex_bucket_lock(bucket);
344 for (j = 0; j < torrents_list->size; ++j) { 344 for (j = 0; j < torrents_list->size; ++j) {
345 ot_torrent *torrent = (ot_torrent *)(torrents_list->data) + j; 345 ot_torrent *torrent = (ot_torrent *)(torrents_list->data) + j;
346 size_t peer_count = torrent->peer_list6->peer_count + torrent->peer_list4->peer_count; 346 size_t peer_count = peerlist_peer_count(torrent->peer_list6) + peerlist_peer_count(torrent->peer_list4);
347 size_t seed_count = torrent->peer_list6->seed_count + torrent->peer_list4->seed_count; 347 size_t seed_count = peerlist_seed_count(torrent->peer_list6) + peerlist_seed_count(torrent->peer_list4);
348 size_t leech_count = peer_count - seed_count; 348 size_t leech_count = peer_count - seed_count;
349 349
350 stats_insert_into_highscore(peer_count, top100c, amount, &torrent->hash); 350 stats_insert_into_highscore(peer_count, top100c, amount, &torrent->hash);