From 61b41adf1a054cb5d0fcd4a1135f48852a1723d1 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 10 Jun 2008 01:46:36 +0000 Subject: [PATCH] have idle webseeds return a speed of -1 instead of 0 so that we can differentiate between stalled and idle. document this in transmission.h. --- libtransmission/peer-mgr.c | 3 ++- libtransmission/transmission.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libtransmission/peer-mgr.c b/libtransmission/peer-mgr.c index 5abf512e5..aadb0e465 100644 --- a/libtransmission/peer-mgr.c +++ b/libtransmission/peer-mgr.c @@ -1426,7 +1426,8 @@ tr_peerMgrWebSpeeds( const tr_peerMgr * manager, ret = tr_new0( float, webseedCount ); for( i=0; iinfo.webseedCount floats giving download speeds. * Each speed in the array corresponds to the webseed at the same * array index in tor->info.webseeds. + * To differentiate "idle" and "stalled" status, idle webseeds will + * return -1 instead of 0 KiB/s. * NOTE: always free this array with tr_free() when you're done with it. */ float* tr_torrentWebSpeeds( const tr_torrent * tor ); -- 2.40.0