diff options
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r-- | src/transport/plugin_transport_udp.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 900cb1580..48535f28b 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -102,7 +102,7 @@ struct PrettyPrinterContext | |||
102 | /** | 102 | /** |
103 | * Timeout task | 103 | * Timeout task |
104 | */ | 104 | */ |
105 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 105 | struct GNUNET_SCHEDULER_Task * timeout_task; |
106 | 106 | ||
107 | /** | 107 | /** |
108 | * IPv6 address | 108 | * IPv6 address |
@@ -155,7 +155,7 @@ struct Session | |||
155 | /** | 155 | /** |
156 | * Session timeout task | 156 | * Session timeout task |
157 | */ | 157 | */ |
158 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 158 | struct GNUNET_SCHEDULER_Task * timeout_task; |
159 | 159 | ||
160 | /** | 160 | /** |
161 | * When does this session time out? | 161 | * When does this session time out? |
@@ -566,7 +566,7 @@ schedule_select (struct Plugin *plugin) | |||
566 | GNUNET_TIME_absolute_get_remaining ( | 566 | GNUNET_TIME_absolute_get_remaining ( |
567 | udpw->session->flow_delay_from_other_peer)); | 567 | udpw->session->flow_delay_from_other_peer)); |
568 | 568 | ||
569 | if (plugin->select_task != GNUNET_SCHEDULER_NO_TASK ) | 569 | if (plugin->select_task != NULL ) |
570 | GNUNET_SCHEDULER_cancel (plugin->select_task); | 570 | GNUNET_SCHEDULER_cancel (plugin->select_task); |
571 | 571 | ||
572 | /* Schedule with: | 572 | /* Schedule with: |
@@ -587,7 +587,7 @@ schedule_select (struct Plugin *plugin) | |||
587 | GNUNET_TIME_absolute_get_remaining ( | 587 | GNUNET_TIME_absolute_get_remaining ( |
588 | udpw->session->flow_delay_from_other_peer)); | 588 | udpw->session->flow_delay_from_other_peer)); |
589 | 589 | ||
590 | if (GNUNET_SCHEDULER_NO_TASK != plugin->select_task_v6) | 590 | if (NULL != plugin->select_task_v6) |
591 | GNUNET_SCHEDULER_cancel (plugin->select_task_v6); | 591 | GNUNET_SCHEDULER_cancel (plugin->select_task_v6); |
592 | plugin->select_task_v6 = GNUNET_SCHEDULER_add_select ( | 592 | plugin->select_task_v6 = GNUNET_SCHEDULER_add_select ( |
593 | GNUNET_SCHEDULER_PRIORITY_DEFAULT, | 593 | GNUNET_SCHEDULER_PRIORITY_DEFAULT, |
@@ -1332,10 +1332,10 @@ udp_disconnect_session (void *cls, | |||
1332 | GNUNET_i2s (&s->target), | 1332 | GNUNET_i2s (&s->target), |
1333 | udp_address_to_string (NULL, s->address->address, s->address->address_length)); | 1333 | udp_address_to_string (NULL, s->address->address, s->address->address_length)); |
1334 | /* stop timeout task */ | 1334 | /* stop timeout task */ |
1335 | if (GNUNET_SCHEDULER_NO_TASK != s->timeout_task) | 1335 | if (NULL != s->timeout_task) |
1336 | { | 1336 | { |
1337 | GNUNET_SCHEDULER_cancel (s->timeout_task); | 1337 | GNUNET_SCHEDULER_cancel (s->timeout_task); |
1338 | s->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 1338 | s->timeout_task = NULL; |
1339 | } | 1339 | } |
1340 | if (NULL != s->frag_ctx) | 1340 | if (NULL != s->frag_ctx) |
1341 | { | 1341 | { |
@@ -1500,7 +1500,7 @@ session_timeout (void *cls, | |||
1500 | struct Plugin *plugin = s->plugin; | 1500 | struct Plugin *plugin = s->plugin; |
1501 | struct GNUNET_TIME_Relative left; | 1501 | struct GNUNET_TIME_Relative left; |
1502 | 1502 | ||
1503 | s->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 1503 | s->timeout_task = NULL; |
1504 | left = GNUNET_TIME_absolute_get_remaining (s->timeout); | 1504 | left = GNUNET_TIME_absolute_get_remaining (s->timeout); |
1505 | if (left.rel_value_us > 0) | 1505 | if (left.rel_value_us > 0) |
1506 | { | 1506 | { |
@@ -1534,7 +1534,7 @@ reschedule_session_timeout (struct Session *s) | |||
1534 | { | 1534 | { |
1535 | if (GNUNET_YES == s->in_destroy) | 1535 | if (GNUNET_YES == s->in_destroy) |
1536 | return; | 1536 | return; |
1537 | GNUNET_assert(GNUNET_SCHEDULER_NO_TASK != s->timeout_task); | 1537 | GNUNET_assert(NULL != s->timeout_task); |
1538 | s->timeout = GNUNET_TIME_relative_to_absolute (UDP_SESSION_TIME_OUT); | 1538 | s->timeout = GNUNET_TIME_relative_to_absolute (UDP_SESSION_TIME_OUT); |
1539 | } | 1539 | } |
1540 | 1540 | ||
@@ -3027,7 +3027,7 @@ udp_plugin_select (void *cls, | |||
3027 | { | 3027 | { |
3028 | struct Plugin *plugin = cls; | 3028 | struct Plugin *plugin = cls; |
3029 | 3029 | ||
3030 | plugin->select_task = GNUNET_SCHEDULER_NO_TASK; | 3030 | plugin->select_task = NULL; |
3031 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 3031 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
3032 | return; | 3032 | return; |
3033 | if ((0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) | 3033 | if ((0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) |
@@ -3056,7 +3056,7 @@ udp_plugin_select_v6 (void *cls, | |||
3056 | { | 3056 | { |
3057 | struct Plugin *plugin = cls; | 3057 | struct Plugin *plugin = cls; |
3058 | 3058 | ||
3059 | plugin->select_task_v6 = GNUNET_SCHEDULER_NO_TASK; | 3059 | plugin->select_task_v6 = NULL; |
3060 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 3060 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
3061 | return; | 3061 | return; |
3062 | if (((tc->reason & GNUNET_SCHEDULER_REASON_READ_READY) != 0) | 3062 | if (((tc->reason & GNUNET_SCHEDULER_REASON_READ_READY) != 0) |
@@ -3610,15 +3610,15 @@ libgnunet_plugin_transport_udp_done (void *cls) | |||
3610 | return NULL; | 3610 | return NULL; |
3611 | } | 3611 | } |
3612 | stop_broadcast (plugin); | 3612 | stop_broadcast (plugin); |
3613 | if (plugin->select_task != GNUNET_SCHEDULER_NO_TASK ) | 3613 | if (plugin->select_task != NULL ) |
3614 | { | 3614 | { |
3615 | GNUNET_SCHEDULER_cancel (plugin->select_task); | 3615 | GNUNET_SCHEDULER_cancel (plugin->select_task); |
3616 | plugin->select_task = GNUNET_SCHEDULER_NO_TASK; | 3616 | plugin->select_task = NULL; |
3617 | } | 3617 | } |
3618 | if (plugin->select_task_v6 != GNUNET_SCHEDULER_NO_TASK ) | 3618 | if (plugin->select_task_v6 != NULL ) |
3619 | { | 3619 | { |
3620 | GNUNET_SCHEDULER_cancel (plugin->select_task_v6); | 3620 | GNUNET_SCHEDULER_cancel (plugin->select_task_v6); |
3621 | plugin->select_task_v6 = GNUNET_SCHEDULER_NO_TASK; | 3621 | plugin->select_task_v6 = NULL; |
3622 | } | 3622 | } |
3623 | 3623 | ||
3624 | /* Closing sockets */ | 3624 | /* Closing sockets */ |