From ef9610f9db7947b7d516b9e3b8a178ef6a7088a8 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 May 2015 08:22:41 +0000 Subject: [PATCH] -simplify socket NULL check --- src/transport/plugin_transport_udp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index c638b6668..ce4d30277 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c @@ -3255,8 +3255,9 @@ udp_plugin_select_v4 (void *cls, plugin->select_task_v4 = NULL; if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) return; + if (NULL == plugin->sockv4) + return; if ((0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) && - (NULL != plugin->sockv4) && (GNUNET_NETWORK_fdset_isset (tc->read_ready, plugin->sockv4))) udp_select_read (plugin, @@ -3284,12 +3285,14 @@ udp_plugin_select_v6 (void *cls, plugin->select_task_v6 = NULL; if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) return; + if (NULL == plugin->sockv6) + return; if ( (0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) && - (NULL != plugin->sockv6) && (GNUNET_NETWORK_fdset_isset (tc->read_ready, plugin->sockv6)) ) udp_select_read (plugin, plugin->sockv6); + udp_select_send (plugin, plugin->sockv6); schedule_select_v6 (plugin); -- 2.25.1