]> granicus.if.org Git - transmission/commitdiff
Fix incorrect use of tr_timerAdd.
authorJuliusz Chroboczek <jch@pps.univ-paris-diderot.fr>
Fri, 18 Feb 2011 00:23:49 +0000 (00:23 +0000)
committerJuliusz Chroboczek <jch@pps.univ-paris-diderot.fr>
Fri, 18 Feb 2011 00:23:49 +0000 (00:23 +0000)
libtransmission/tr-utp.c

index e13f51477edbff584daddce92b0ddb2098823340..b9d832a4b74f7dec26aed11abd959acca971016b 100644 (file)
@@ -56,7 +56,7 @@ static void
 timer_callback(int s UNUSED, short type UNUSED, void *closure UNUSED)
 {
     UTP_CheckTimeouts();
-    tr_timerAdd(utp_timer, 0, tr_cryptoWeakRandInt(2000000));
+    tr_timerAdd(utp_timer, 1, tr_cryptoWeakRandInt(1000000));
 }
 
 int
@@ -69,7 +69,7 @@ tr_utpPacket(const unsigned char *buf, size_t buflen,
         if(utp_timer == NULL)
             return -1;
         evtimer_set(utp_timer, timer_callback, NULL);
-        tr_timerAdd(utp_timer, 0, tr_cryptoWeakRandInt(2000000));
+        tr_timerAdd(utp_timer, 1, tr_cryptoWeakRandInt(1000000));
     }
 
     return UTP_IsIncomingUTP(incoming, send_to, ss,