From 9dc679ab582e6a1a938422ffe9e95bb19f40e8ca Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sat, 21 Nov 2009 03:13:27 +0000 Subject: [PATCH] Display the proper seeder/leecher/download count for backup trackers, instead of all zeros. --- libtransmission/announcer.c | 8 ++++---- libtransmission/peer-mgr.c | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/libtransmission/announcer.c b/libtransmission/announcer.c index 89c6c3bde..98f04a074 100644 --- a/libtransmission/announcer.c +++ b/libtransmission/announcer.c @@ -1722,6 +1722,10 @@ tr_announcerStats( const tr_torrent * torrent, st->isBackup = tracker != tier->currentTracker; st->lastScrapeStartTime = tier->lastScrapeStartTime; + st->seederCount = tracker->seederCount; + st->leecherCount = tracker->leecherCount; + st->downloadCount = tracker->downloadCount; + if( st->isBackup ) { st->scrapeState = TR_TRACKER_INACTIVE; @@ -1770,10 +1774,6 @@ tr_announcerStats( const tr_torrent * torrent, } else st->announceState = TR_TRACKER_QUEUED; - - st->seederCount = tracker->seederCount; - st->leecherCount = tracker->leecherCount; - st->downloadCount = tracker->downloadCount; } } } diff --git a/libtransmission/peer-mgr.c b/libtransmission/peer-mgr.c index 63ff5633c..5b43bb61a 100644 --- a/libtransmission/peer-mgr.c +++ b/libtransmission/peer-mgr.c @@ -1792,7 +1792,6 @@ tr_peerMgrGetPeers( tr_torrent * tor, assert( tr_isTorrent( tor ) ); assert( setme_pex != NULL ); - assert( setme_pex != NULL ); assert( af==TR_AF_INET || af==TR_AF_INET6 ); assert( list_mode==TR_PEERS_CONNECTED || list_mode==TR_PEERS_ALL );