From 1cfa2ac38b8bceaa22d86cd25ec862a815a52348 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Fri, 18 Feb 2011 00:24:11 +0000 Subject: [PATCH] Update tr-utp.c to be compatible with libevent2. --- libtransmission/tr-utp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libtransmission/tr-utp.c b/libtransmission/tr-utp.c index af557408a..9a74c710d 100644 --- a/libtransmission/tr-utp.c +++ b/libtransmission/tr-utp.c @@ -96,12 +96,12 @@ tr_utpPacket(const unsigned char *buf, size_t buflen, tr_session *ss) { if(utp_timer == NULL) { - utp_timer = tr_new0(struct event, 1); + utp_timer = evtimer_new( ss->event_base, timer_callback, NULL); if(utp_timer == NULL) return -1; - evtimer_set(utp_timer, timer_callback, NULL); tr_timerAdd(utp_timer, 0, - UTP_INTERVAL_US / 2 + tr_cryptoWeakRandInt(UTP_INTERVAL_US)); + UTP_INTERVAL_US / 2 + + tr_cryptoWeakRandInt(UTP_INTERVAL_US)); } return UTP_IsIncomingUTP(incoming, send_to, ss,