From: Juliusz Chroboczek Date: Sun, 9 Jan 2011 23:04:56 +0000 (+0000) Subject: Fix UDP error handling. X-Git-Tag: 2.20b1~70 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff0393acbcc69e419ad6cae87125588e16810a28;p=transmission Fix UDP error handling. --- diff --git a/libtransmission/tr-udp.c b/libtransmission/tr-udp.c index 68a6b0595..70a54770a 100644 --- a/libtransmission/tr-udp.c +++ b/libtransmission/tr-udp.c @@ -174,8 +174,8 @@ tr_udpInit(tr_session *ss, const tr_address * addr) ss->udp_event = event_new(NULL, ss->udp_socket, EV_READ | EV_PERSIST, event_callback, ss); - tr_nerr("UDP", "Couldn't allocate IPv4 event"); - /* Don't bother recovering for now. */ + if( ss->udp_event == NULL ) + tr_nerr("UDP", "Couldn't allocate IPv4 event"); ipv6: if(tr_globalIPv6())