diff options
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r-- | src/transport/plugin_transport_udp.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 89feb8f5c..b5706f024 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -3516,13 +3516,11 @@ udp_plugin_select_v4 (void *cls) | |||
3516 | { | 3516 | { |
3517 | struct Plugin *plugin = cls; | 3517 | struct Plugin *plugin = cls; |
3518 | const struct GNUNET_SCHEDULER_TaskContext *tc; | 3518 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
3519 | 3519 | ||
3520 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
3521 | plugin->select_task_v4 = NULL; | 3520 | plugin->select_task_v4 = NULL; |
3522 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | ||
3523 | return; | ||
3524 | if (NULL == plugin->sockv4) | 3521 | if (NULL == plugin->sockv4) |
3525 | return; | 3522 | return; |
3523 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
3526 | if ((0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) && | 3524 | if ((0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) && |
3527 | (GNUNET_NETWORK_fdset_isset (tc->read_ready, | 3525 | (GNUNET_NETWORK_fdset_isset (tc->read_ready, |
3528 | plugin->sockv4))) | 3526 | plugin->sockv4))) |
@@ -3547,12 +3545,10 @@ udp_plugin_select_v6 (void *cls) | |||
3547 | struct Plugin *plugin = cls; | 3545 | struct Plugin *plugin = cls; |
3548 | const struct GNUNET_SCHEDULER_TaskContext *tc; | 3546 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
3549 | 3547 | ||
3550 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
3551 | plugin->select_task_v6 = NULL; | 3548 | plugin->select_task_v6 = NULL; |
3552 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | ||
3553 | return; | ||
3554 | if (NULL == plugin->sockv6) | 3549 | if (NULL == plugin->sockv6) |
3555 | return; | 3550 | return; |
3551 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
3556 | if ( (0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) && | 3552 | if ( (0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) && |
3557 | (GNUNET_NETWORK_fdset_isset (tc->read_ready, | 3553 | (GNUNET_NETWORK_fdset_isset (tc->read_ready, |
3558 | plugin->sockv6)) ) | 3554 | plugin->sockv6)) ) |