Fix incorrect use of tr_timerAdd.

This commit is contained in:
Juliusz Chroboczek 2011-02-18 00:23:49 +00:00
parent c5e3cfecb9
commit 98ea0addb0
1 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ static void
timer_callback(int s UNUSED, short type UNUSED, void *closure UNUSED) timer_callback(int s UNUSED, short type UNUSED, void *closure UNUSED)
{ {
UTP_CheckTimeouts(); UTP_CheckTimeouts();
tr_timerAdd(utp_timer, 0, tr_cryptoWeakRandInt(2000000)); tr_timerAdd(utp_timer, 1, tr_cryptoWeakRandInt(1000000));
} }
int int
@ -69,7 +69,7 @@ tr_utpPacket(const unsigned char *buf, size_t buflen,
if(utp_timer == NULL) if(utp_timer == NULL)
return -1; return -1;
evtimer_set(utp_timer, timer_callback, NULL); 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, return UTP_IsIncomingUTP(incoming, send_to, ss,