From e5143dbf9c598d35d015e7eecc97a360c9d39b67 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Tue, 22 Mar 2011 16:50:09 +0000 Subject: [PATCH] (trunk libT) #4136 "r12181 causes excessive disk activity and logfile bloat" -- fixed. --- libtransmission/tr-dht.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libtransmission/tr-dht.c b/libtransmission/tr-dht.c index 9216254e9..44171e002 100644 --- a/libtransmission/tr-dht.c +++ b/libtransmission/tr-dht.c @@ -604,18 +604,18 @@ tr_dhtUpkeep( tr_session * session ) { const int rc = tr_dhtAnnounce(tor, AF_INET, 1); - tor->dhtAnnounceAt = now + (rc == 0) + tor->dhtAnnounceAt = now + ((rc == 0) ? 5 + tr_cryptoWeakRandInt( 5 ) - : 25 * 60 + tr_cryptoWeakRandInt( 3*60 ); + : 25 * 60 + tr_cryptoWeakRandInt( 3*60 )); } if( tor->dhtAnnounce6At <= now ) { const int rc = tr_dhtAnnounce(tor, AF_INET6, 1); - tor->dhtAnnounce6At = now + (rc == 0) + tor->dhtAnnounce6At = now + ((rc == 0) ? 5 + tr_cryptoWeakRandInt( 5 ) - : 25 * 60 + tr_cryptoWeakRandInt( 3*60 ); + : 25 * 60 + tr_cryptoWeakRandInt( 3*60 )); } } }