1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-23 16:24:02 +00:00

Fix incorrect usage of event_new in UDP code.

Apparently you need to pass session->event_base as the first argument.
This commit is contained in:
Juliusz Chroboczek 2011-01-09 23:14:17 +00:00
parent ff0393acbc
commit 1ef888f9f1
2 changed files with 3 additions and 3 deletions

View file

@ -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" );

View file

@ -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");