aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_udp.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-05-01 08:22:41 +0000
committerChristian Grothoff <christian@grothoff.org>2015-05-01 08:22:41 +0000
commitef9610f9db7947b7d516b9e3b8a178ef6a7088a8 (patch)
treef37106655e98ac9ccd242c6d02cf3765648bc2a5 /src/transport/plugin_transport_udp.c
parenta3817a1cbb2468ce4d9a86b0bfbab3f648cb7446 (diff)
downloadgnunet-ef9610f9db7947b7d516b9e3b8a178ef6a7088a8.tar.gz
gnunet-ef9610f9db7947b7d516b9e3b8a178ef6a7088a8.zip
-simplify socket NULL check
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r--src/transport/plugin_transport_udp.c7
1 files 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,
3255 plugin->select_task_v4 = NULL; 3255 plugin->select_task_v4 = NULL;
3256 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 3256 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
3257 return; 3257 return;
3258 if (NULL == plugin->sockv4)
3259 return;
3258 if ((0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) && 3260 if ((0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) &&
3259 (NULL != plugin->sockv4) &&
3260 (GNUNET_NETWORK_fdset_isset (tc->read_ready, 3261 (GNUNET_NETWORK_fdset_isset (tc->read_ready,
3261 plugin->sockv4))) 3262 plugin->sockv4)))
3262 udp_select_read (plugin, 3263 udp_select_read (plugin,
@@ -3284,12 +3285,14 @@ udp_plugin_select_v6 (void *cls,
3284 plugin->select_task_v6 = NULL; 3285 plugin->select_task_v6 = NULL;
3285 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 3286 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
3286 return; 3287 return;
3288 if (NULL == plugin->sockv6)
3289 return;
3287 if ( (0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) && 3290 if ( (0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) &&
3288 (NULL != plugin->sockv6) &&
3289 (GNUNET_NETWORK_fdset_isset (tc->read_ready, 3291 (GNUNET_NETWORK_fdset_isset (tc->read_ready,
3290 plugin->sockv6)) ) 3292 plugin->sockv6)) )
3291 udp_select_read (plugin, 3293 udp_select_read (plugin,
3292 plugin->sockv6); 3294 plugin->sockv6);
3295
3293 udp_select_send (plugin, 3296 udp_select_send (plugin,
3294 plugin->sockv6); 3297 plugin->sockv6);
3295 schedule_select_v6 (plugin); 3298 schedule_select_v6 (plugin);