mirror of
https://github.com/transmission/transmission
synced 2024-12-24 16:52:39 +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:
parent
ff0393acbc
commit
1ef888f9f1
2 changed files with 3 additions and 3 deletions
|
@ -315,7 +315,7 @@ tr_dhtInit(tr_session *ss)
|
||||||
cl->len6 = len6;
|
cl->len6 = len6;
|
||||||
tr_threadNew( dht_bootstrap, cl );
|
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_timerAdd( dht_timer, 0, tr_cryptoWeakRandInt( 1000000 ) );
|
||||||
|
|
||||||
tr_ndbg( "DHT", "DHT initialized" );
|
tr_ndbg( "DHT", "DHT initialized" );
|
||||||
|
|
|
@ -172,7 +172,7 @@ tr_udpInit(tr_session *ss, const tr_address * addr)
|
||||||
goto ipv6;
|
goto ipv6;
|
||||||
}
|
}
|
||||||
ss->udp_event =
|
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);
|
event_callback, ss);
|
||||||
if( ss->udp_event == NULL )
|
if( ss->udp_event == NULL )
|
||||||
tr_nerr("UDP", "Couldn't allocate IPv4 event");
|
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);
|
rebind_ipv6(ss, TRUE);
|
||||||
if(ss->udp6_socket >= 0) {
|
if(ss->udp6_socket >= 0) {
|
||||||
ss->udp6_event =
|
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);
|
event_callback, ss);
|
||||||
if(ss->udp6_event == NULL)
|
if(ss->udp6_event == NULL)
|
||||||
tr_nerr("UDP", "Couldn't allocate IPv6 event");
|
tr_nerr("UDP", "Couldn't allocate IPv6 event");
|
||||||
|
|
Loading…
Reference in a new issue