diff --git a/libtransmission/tr-dht.c b/libtransmission/tr-dht.c index 24a19a0ef..8cd6c1d8c 100644 --- a/libtransmission/tr-dht.c +++ b/libtransmission/tr-dht.c @@ -315,7 +315,7 @@ tr_dhtInit(tr_session *ss) cl->len6 = len6; tr_threadNew( dht_bootstrap, cl ); - dht_timer = evtimer_new( NULL, timer_callback, session ); + dht_timer = evtimer_new( session->event_base, timer_callback, session ); tr_timerAdd( dht_timer, 0, tr_cryptoWeakRandInt( 1000000 ) ); tr_ndbg( "DHT", "DHT initialized" ); diff --git a/libtransmission/tr-udp.c b/libtransmission/tr-udp.c index 70a54770a..ab56b81c4 100644 --- a/libtransmission/tr-udp.c +++ b/libtransmission/tr-udp.c @@ -172,7 +172,7 @@ tr_udpInit(tr_session *ss, const tr_address * addr) goto ipv6; } ss->udp_event = - event_new(NULL, ss->udp_socket, EV_READ | EV_PERSIST, + event_new(ss->event_base, ss->udp_socket, EV_READ | EV_PERSIST, event_callback, ss); if( ss->udp_event == NULL ) tr_nerr("UDP", "Couldn't allocate IPv4 event"); @@ -182,7 +182,7 @@ tr_udpInit(tr_session *ss, const tr_address * addr) rebind_ipv6(ss, TRUE); if(ss->udp6_socket >= 0) { ss->udp6_event = - event_new(NULL, ss->udp6_socket, EV_READ | EV_PERSIST, + event_new(ss->event_base, ss->udp6_socket, EV_READ | EV_PERSIST, event_callback, ss); if(ss->udp6_event == NULL) tr_nerr("UDP", "Couldn't allocate IPv6 event");