diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-12-24 01:10:47 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-12-24 01:10:47 +0000 |
commit | f1f603c7d0b3f03dca46a4f313472288eb080eb1 (patch) | |
tree | 3a29966b02dfb83e0a8a8d5c42b3116380209fb0 /src/transport | |
parent | 53cd5b8eda2fa8db86b0907a62a39598981d008a (diff) | |
download | gnunet-f1f603c7d0b3f03dca46a4f313472288eb080eb1.tar.gz gnunet-f1f603c7d0b3f03dca46a4f313472288eb080eb1.zip |
making GNUNET_SCHEDULER_cancel() perform in O(1) instead of O(n) to help or even fully address #3247
Diffstat (limited to 'src/transport')
47 files changed, 546 insertions, 546 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 63f8f9f68..cd131ae39 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -68,7 +68,7 @@ struct SessionKiller | |||
68 | /** | 68 | /** |
69 | * The kill task. | 69 | * The kill task. |
70 | */ | 70 | */ |
71 | GNUNET_SCHEDULER_TaskIdentifier task; | 71 | struct GNUNET_SCHEDULER_Task * task; |
72 | }; | 72 | }; |
73 | 73 | ||
74 | struct BlacklistCheckContext | 74 | struct BlacklistCheckContext |
@@ -246,7 +246,7 @@ kill_session_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
246 | { | 246 | { |
247 | struct SessionKiller *sk = cls; | 247 | struct SessionKiller *sk = cls; |
248 | 248 | ||
249 | sk->task = GNUNET_SCHEDULER_NO_TASK; | 249 | sk->task = NULL; |
250 | GNUNET_CONTAINER_DLL_remove(sk_head, sk_tail, sk); | 250 | GNUNET_CONTAINER_DLL_remove(sk_head, sk_tail, sk); |
251 | sk->plugin->disconnect_session (sk->plugin->cls, sk->session); | 251 | sk->plugin->disconnect_session (sk->plugin->cls, sk->session); |
252 | GNUNET_free(sk); | 252 | GNUNET_free(sk); |
diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c index b7303f8eb..f1904a5d3 100644 --- a/src/transport/gnunet-service-transport_blacklist.c +++ b/src/transport/gnunet-service-transport_blacklist.c | |||
@@ -159,7 +159,7 @@ struct GST_BlacklistCheck | |||
159 | /** | 159 | /** |
160 | * Current task performing the check. | 160 | * Current task performing the check. |
161 | */ | 161 | */ |
162 | GNUNET_SCHEDULER_TaskIdentifier task; | 162 | struct GNUNET_SCHEDULER_Task * task; |
163 | 163 | ||
164 | }; | 164 | }; |
165 | 165 | ||
@@ -230,7 +230,7 @@ client_disconnect_notification (void *cls, struct GNUNET_SERVER_Client *client) | |||
230 | GNUNET_SERVER_notify_transmit_ready_cancel (bc->th); | 230 | GNUNET_SERVER_notify_transmit_ready_cancel (bc->th); |
231 | bc->th = NULL; | 231 | bc->th = NULL; |
232 | } | 232 | } |
233 | if (bc->task == GNUNET_SCHEDULER_NO_TASK) | 233 | if (bc->task == NULL) |
234 | bc->task = GNUNET_SCHEDULER_add_now (&do_blacklist_check, bc); | 234 | bc->task = GNUNET_SCHEDULER_add_now (&do_blacklist_check, bc); |
235 | } | 235 | } |
236 | GNUNET_CONTAINER_DLL_remove (bl_head, bl_tail, bl); | 236 | GNUNET_CONTAINER_DLL_remove (bl_head, bl_tail, bl); |
@@ -392,7 +392,7 @@ transmit_blacklist_message (void *cls, size_t size, void *buf) | |||
392 | bc->th = NULL; | 392 | bc->th = NULL; |
393 | if (size == 0) | 393 | if (size == 0) |
394 | { | 394 | { |
395 | GNUNET_assert (bc->task == GNUNET_SCHEDULER_NO_TASK); | 395 | GNUNET_assert (bc->task == NULL); |
396 | bc->task = GNUNET_SCHEDULER_add_now (&do_blacklist_check, bc); | 396 | bc->task = GNUNET_SCHEDULER_add_now (&do_blacklist_check, bc); |
397 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 397 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
398 | "Failed to send blacklist test for peer `%s' to client\n", | 398 | "Failed to send blacklist test for peer `%s' to client\n", |
@@ -432,7 +432,7 @@ do_blacklist_check (void *cls, | |||
432 | struct GST_BlacklistCheck *bc = cls; | 432 | struct GST_BlacklistCheck *bc = cls; |
433 | struct Blacklisters *bl; | 433 | struct Blacklisters *bl; |
434 | 434 | ||
435 | bc->task = GNUNET_SCHEDULER_NO_TASK; | 435 | bc->task = NULL; |
436 | bl = bc->bl_pos; | 436 | bl = bc->bl_pos; |
437 | if (bl == NULL) | 437 | if (bl == NULL) |
438 | { | 438 | { |
@@ -642,7 +642,7 @@ GST_blacklist_handle_reply (void *cls, struct GNUNET_SERVER_Client *client, | |||
642 | } | 642 | } |
643 | /* check if any other blacklist checks are waiting for this blacklister */ | 643 | /* check if any other blacklist checks are waiting for this blacklister */ |
644 | for (bc = bc_head; bc != NULL; bc = bc->next) | 644 | for (bc = bc_head; bc != NULL; bc = bc->next) |
645 | if ((bc->bl_pos == bl) && (GNUNET_SCHEDULER_NO_TASK == bc->task)) | 645 | if ((bc->bl_pos == bl) && (NULL == bc->task)) |
646 | { | 646 | { |
647 | bc->task = GNUNET_SCHEDULER_add_now (&do_blacklist_check, bc); | 647 | bc->task = GNUNET_SCHEDULER_add_now (&do_blacklist_check, bc); |
648 | break; | 648 | break; |
@@ -817,10 +817,10 @@ GST_blacklist_test_cancel (struct GST_BlacklistCheck *bc) | |||
817 | bc->bl_pos->bc = NULL; | 817 | bc->bl_pos->bc = NULL; |
818 | } | 818 | } |
819 | } | 819 | } |
820 | if (GNUNET_SCHEDULER_NO_TASK != bc->task) | 820 | if (NULL != bc->task) |
821 | { | 821 | { |
822 | GNUNET_SCHEDULER_cancel (bc->task); | 822 | GNUNET_SCHEDULER_cancel (bc->task); |
823 | bc->task = GNUNET_SCHEDULER_NO_TASK; | 823 | bc->task = NULL; |
824 | } | 824 | } |
825 | if (NULL != bc->th) | 825 | if (NULL != bc->th) |
826 | { | 826 | { |
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c index 49992222d..43c938a5e 100644 --- a/src/transport/gnunet-service-transport_hello.c +++ b/src/transport/gnunet-service-transport_hello.c | |||
@@ -107,7 +107,7 @@ struct OwnAddressList *oal_tail; | |||
107 | /** | 107 | /** |
108 | * Identifier of 'refresh_hello' task. | 108 | * Identifier of 'refresh_hello' task. |
109 | */ | 109 | */ |
110 | static GNUNET_SCHEDULER_TaskIdentifier hello_task; | 110 | static struct GNUNET_SCHEDULER_Task * hello_task; |
111 | 111 | ||
112 | 112 | ||
113 | /** | 113 | /** |
@@ -164,7 +164,7 @@ refresh_hello_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
164 | struct GeneratorContext gc; | 164 | struct GeneratorContext gc; |
165 | int friend_only; | 165 | int friend_only; |
166 | 166 | ||
167 | hello_task = GNUNET_SCHEDULER_NO_TASK; | 167 | hello_task = NULL; |
168 | gc.addr_pos = oal_head; | 168 | gc.addr_pos = oal_head; |
169 | gc.expiration = GNUNET_TIME_relative_to_absolute (hello_expiration); | 169 | gc.expiration = GNUNET_TIME_relative_to_absolute (hello_expiration); |
170 | 170 | ||
@@ -198,7 +198,7 @@ refresh_hello_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
198 | static void | 198 | static void |
199 | refresh_hello () | 199 | refresh_hello () |
200 | { | 200 | { |
201 | if (hello_task != GNUNET_SCHEDULER_NO_TASK) | 201 | if (hello_task != NULL) |
202 | GNUNET_SCHEDULER_cancel (hello_task); | 202 | GNUNET_SCHEDULER_cancel (hello_task); |
203 | hello_task = GNUNET_SCHEDULER_add_now (&refresh_hello_task, NULL); | 203 | hello_task = GNUNET_SCHEDULER_add_now (&refresh_hello_task, NULL); |
204 | } | 204 | } |
@@ -231,10 +231,10 @@ GST_hello_stop () | |||
231 | { | 231 | { |
232 | hello_cb = NULL; | 232 | hello_cb = NULL; |
233 | hello_cb_cls = NULL; | 233 | hello_cb_cls = NULL; |
234 | if (GNUNET_SCHEDULER_NO_TASK != hello_task) | 234 | if (NULL != hello_task) |
235 | { | 235 | { |
236 | GNUNET_SCHEDULER_cancel (hello_task); | 236 | GNUNET_SCHEDULER_cancel (hello_task); |
237 | hello_task = GNUNET_SCHEDULER_NO_TASK; | 237 | hello_task = NULL; |
238 | } | 238 | } |
239 | if (NULL != our_hello) | 239 | if (NULL != our_hello) |
240 | { | 240 | { |
diff --git a/src/transport/gnunet-service-transport_manipulation.c b/src/transport/gnunet-service-transport_manipulation.c index bfd2594a8..0d0249bc2 100644 --- a/src/transport/gnunet-service-transport_manipulation.c +++ b/src/transport/gnunet-service-transport_manipulation.c | |||
@@ -92,7 +92,7 @@ struct TM_Peer | |||
92 | /** | 92 | /** |
93 | * Task to schedule delayed sendding | 93 | * Task to schedule delayed sendding |
94 | */ | 94 | */ |
95 | GNUNET_SCHEDULER_TaskIdentifier send_delay_task; | 95 | struct GNUNET_SCHEDULER_Task * send_delay_task; |
96 | 96 | ||
97 | /** | 97 | /** |
98 | * Send queue DLL head | 98 | * Send queue DLL head |
@@ -191,7 +191,7 @@ struct DelayQueueEntry *generic_dqe_tail; | |||
191 | /** | 191 | /** |
192 | * Task to schedule delayed sending based on general delay | 192 | * Task to schedule delayed sending based on general delay |
193 | */ | 193 | */ |
194 | GNUNET_SCHEDULER_TaskIdentifier generic_send_delay_task; | 194 | struct GNUNET_SCHEDULER_Task * generic_send_delay_task; |
195 | 195 | ||
196 | static void | 196 | static void |
197 | set_metric(struct TM_Peer *dest, int direction, uint32_t type, uint32_t value) | 197 | set_metric(struct TM_Peer *dest, int direction, uint32_t type, uint32_t value) |
@@ -358,7 +358,7 @@ send_delayed(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
358 | if (NULL != tmp) | 358 | if (NULL != tmp) |
359 | { | 359 | { |
360 | GNUNET_break(GNUNET_YES == GST_neighbours_test_connected (&dqe->id)); | 360 | GNUNET_break(GNUNET_YES == GST_neighbours_test_connected (&dqe->id)); |
361 | tmp->send_delay_task = GNUNET_SCHEDULER_NO_TASK; | 361 | tmp->send_delay_task = NULL; |
362 | GNUNET_CONTAINER_DLL_remove(tmp->send_head, tmp->send_tail, dqe); | 362 | GNUNET_CONTAINER_DLL_remove(tmp->send_head, tmp->send_tail, dqe); |
363 | GST_neighbours_send(&dqe->id, dqe->msg, dqe->msg_size, dqe->timeout, | 363 | GST_neighbours_send(&dqe->id, dqe->msg, dqe->msg_size, dqe->timeout, |
364 | dqe->cont, dqe->cont_cls); | 364 | dqe->cont, dqe->cont_cls); |
@@ -376,7 +376,7 @@ send_delayed(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
376 | { | 376 | { |
377 | /* Remove from generic queue */ | 377 | /* Remove from generic queue */ |
378 | GNUNET_break(GNUNET_YES == GST_neighbours_test_connected (&dqe->id)); | 378 | GNUNET_break(GNUNET_YES == GST_neighbours_test_connected (&dqe->id)); |
379 | generic_send_delay_task = GNUNET_SCHEDULER_NO_TASK; | 379 | generic_send_delay_task = NULL; |
380 | GNUNET_CONTAINER_DLL_remove(generic_dqe_head, generic_dqe_tail, dqe); | 380 | GNUNET_CONTAINER_DLL_remove(generic_dqe_head, generic_dqe_tail, dqe); |
381 | GST_neighbours_send(&dqe->id, dqe->msg, dqe->msg_size, dqe->timeout, | 381 | GST_neighbours_send(&dqe->id, dqe->msg, dqe->msg_size, dqe->timeout, |
382 | dqe->cont, dqe->cont_cls); | 382 | dqe->cont, dqe->cont_cls); |
@@ -434,7 +434,7 @@ GST_manipulation_send(const struct GNUNET_PeerIdentity *target, const void *msg, | |||
434 | dqe->timeout = timeout; | 434 | dqe->timeout = timeout; |
435 | memcpy(dqe->msg, msg, msg_size); | 435 | memcpy(dqe->msg, msg, msg_size); |
436 | GNUNET_CONTAINER_DLL_insert_tail(tmp->send_head, tmp->send_tail, dqe); | 436 | GNUNET_CONTAINER_DLL_insert_tail(tmp->send_head, tmp->send_tail, dqe); |
437 | if (GNUNET_SCHEDULER_NO_TASK == tmp->send_delay_task) | 437 | if (NULL == tmp->send_delay_task) |
438 | tmp->send_delay_task = GNUNET_SCHEDULER_add_delayed(delay, | 438 | tmp->send_delay_task = GNUNET_SCHEDULER_add_delayed(delay, |
439 | &send_delayed, dqe); | 439 | &send_delayed, dqe); |
440 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 440 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
@@ -462,7 +462,7 @@ GST_manipulation_send(const struct GNUNET_PeerIdentity *target, const void *msg, | |||
462 | dqe->timeout = timeout; | 462 | dqe->timeout = timeout; |
463 | memcpy(dqe->msg, msg, msg_size); | 463 | memcpy(dqe->msg, msg, msg_size); |
464 | GNUNET_CONTAINER_DLL_insert_tail(generic_dqe_head, generic_dqe_tail, dqe); | 464 | GNUNET_CONTAINER_DLL_insert_tail(generic_dqe_head, generic_dqe_tail, dqe); |
465 | if (GNUNET_SCHEDULER_NO_TASK == generic_send_delay_task) | 465 | if (NULL == generic_send_delay_task) |
466 | { | 466 | { |
467 | generic_send_delay_task = GNUNET_SCHEDULER_add_delayed(delay, | 467 | generic_send_delay_task = GNUNET_SCHEDULER_add_delayed(delay, |
468 | &send_delayed, dqe); | 468 | &send_delayed, dqe); |
@@ -642,10 +642,10 @@ free_tmps(void *cls, const struct GNUNET_PeerIdentity *key, void *value) | |||
642 | dqe->cont(dqe->cont_cls, GNUNET_SYSERR, dqe->msg_size, 0); | 642 | dqe->cont(dqe->cont_cls, GNUNET_SYSERR, dqe->msg_size, 0); |
643 | GNUNET_free(dqe); | 643 | GNUNET_free(dqe); |
644 | } | 644 | } |
645 | if (GNUNET_SCHEDULER_NO_TASK != tmp->send_delay_task) | 645 | if (NULL != tmp->send_delay_task) |
646 | { | 646 | { |
647 | GNUNET_SCHEDULER_cancel(tmp->send_delay_task); | 647 | GNUNET_SCHEDULER_cancel(tmp->send_delay_task); |
648 | tmp->send_delay_task = GNUNET_SCHEDULER_NO_TASK; | 648 | tmp->send_delay_task = NULL; |
649 | } | 649 | } |
650 | GNUNET_free(tmp); | 650 | GNUNET_free(tmp); |
651 | } | 651 | } |
@@ -693,10 +693,10 @@ GST_manipulation_peer_disconnect(const struct GNUNET_PeerIdentity *peer) | |||
693 | GNUNET_free(dqe); | 693 | GNUNET_free(dqe); |
694 | } | 694 | } |
695 | } | 695 | } |
696 | if (GNUNET_SCHEDULER_NO_TASK != generic_send_delay_task) | 696 | if (NULL != generic_send_delay_task) |
697 | { | 697 | { |
698 | GNUNET_SCHEDULER_cancel(generic_send_delay_task); | 698 | GNUNET_SCHEDULER_cancel(generic_send_delay_task); |
699 | generic_send_delay_task = GNUNET_SCHEDULER_NO_TASK; | 699 | generic_send_delay_task = NULL; |
700 | if (NULL != generic_dqe_head) | 700 | if (NULL != generic_dqe_head) |
701 | generic_send_delay_task = GNUNET_SCHEDULER_add_delayed( | 701 | generic_send_delay_task = GNUNET_SCHEDULER_add_delayed( |
702 | GNUNET_TIME_absolute_get_remaining(generic_dqe_head->sent_at), | 702 | GNUNET_TIME_absolute_get_remaining(generic_dqe_head->sent_at), |
@@ -725,10 +725,10 @@ GST_manipulation_stop() | |||
725 | cur->cont(cur->cont_cls, GNUNET_SYSERR, cur->msg_size, 0); | 725 | cur->cont(cur->cont_cls, GNUNET_SYSERR, cur->msg_size, 0); |
726 | GNUNET_free(cur); | 726 | GNUNET_free(cur); |
727 | } | 727 | } |
728 | if (GNUNET_SCHEDULER_NO_TASK != generic_send_delay_task) | 728 | if (NULL != generic_send_delay_task) |
729 | { | 729 | { |
730 | GNUNET_SCHEDULER_cancel(generic_send_delay_task); | 730 | GNUNET_SCHEDULER_cancel(generic_send_delay_task); |
731 | generic_send_delay_task = GNUNET_SCHEDULER_NO_TASK; | 731 | generic_send_delay_task = NULL; |
732 | } | 732 | } |
733 | 733 | ||
734 | free_metric(&man_handle.general); | 734 | free_metric(&man_handle.general); |
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 695adedc9..b4db4c2cb 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -344,12 +344,12 @@ struct NeighbourMapEntry | |||
344 | * Main task that drives this peer (timeouts, keepalives, etc.). | 344 | * Main task that drives this peer (timeouts, keepalives, etc.). |
345 | * Always runs the 'master_task'. | 345 | * Always runs the 'master_task'. |
346 | */ | 346 | */ |
347 | GNUNET_SCHEDULER_TaskIdentifier task; | 347 | struct GNUNET_SCHEDULER_Task * task; |
348 | 348 | ||
349 | /** | 349 | /** |
350 | * Task to disconnect neighbour after we received a DISCONNECT message | 350 | * Task to disconnect neighbour after we received a DISCONNECT message |
351 | */ | 351 | */ |
352 | GNUNET_SCHEDULER_TaskIdentifier delayed_disconnect_task; | 352 | struct GNUNET_SCHEDULER_Task * delayed_disconnect_task; |
353 | 353 | ||
354 | /** | 354 | /** |
355 | * At what time should we sent the next keep-alive message? | 355 | * At what time should we sent the next keep-alive message? |
@@ -539,7 +539,7 @@ static unsigned long long bytes_in_send_queue; | |||
539 | /** | 539 | /** |
540 | * Task transmitting utilization data | 540 | * Task transmitting utilization data |
541 | */ | 541 | */ |
542 | static GNUNET_SCHEDULER_TaskIdentifier util_transmission_tk; | 542 | static struct GNUNET_SCHEDULER_Task * util_transmission_tk; |
543 | 543 | ||
544 | 544 | ||
545 | static struct GNUNET_CONTAINER_MultiPeerMap *registered_quota_notifications; | 545 | static struct GNUNET_CONTAINER_MultiPeerMap *registered_quota_notifications; |
@@ -956,17 +956,17 @@ free_neighbour (struct NeighbourMapEntry *n, | |||
956 | } | 956 | } |
957 | 957 | ||
958 | /* Cancel the disconnect task */ | 958 | /* Cancel the disconnect task */ |
959 | if (GNUNET_SCHEDULER_NO_TASK != n->delayed_disconnect_task) | 959 | if (NULL != n->delayed_disconnect_task) |
960 | { | 960 | { |
961 | GNUNET_SCHEDULER_cancel (n->delayed_disconnect_task); | 961 | GNUNET_SCHEDULER_cancel (n->delayed_disconnect_task); |
962 | n->delayed_disconnect_task = GNUNET_SCHEDULER_NO_TASK; | 962 | n->delayed_disconnect_task = NULL; |
963 | } | 963 | } |
964 | 964 | ||
965 | /* Cancel the master task */ | 965 | /* Cancel the master task */ |
966 | if (GNUNET_SCHEDULER_NO_TASK != n->task) | 966 | if (NULL != n->task) |
967 | { | 967 | { |
968 | GNUNET_SCHEDULER_cancel (n->task); | 968 | GNUNET_SCHEDULER_cancel (n->task); |
969 | n->task = GNUNET_SCHEDULER_NO_TASK; | 969 | n->task = NULL; |
970 | } | 970 | } |
971 | /* free rest of memory */ | 971 | /* free rest of memory */ |
972 | GNUNET_free (n); | 972 | GNUNET_free (n); |
@@ -1054,7 +1054,7 @@ send_disconnect_cont (void *cls, const struct GNUNET_PeerIdentity *target, | |||
1054 | return; /* already gone */ | 1054 | return; /* already gone */ |
1055 | if (GNUNET_TRANSPORT_PS_DISCONNECT != n->state) | 1055 | if (GNUNET_TRANSPORT_PS_DISCONNECT != n->state) |
1056 | return; /* have created a fresh entry since */ | 1056 | return; /* have created a fresh entry since */ |
1057 | if (GNUNET_SCHEDULER_NO_TASK != n->task) | 1057 | if (NULL != n->task) |
1058 | GNUNET_SCHEDULER_cancel (n->task); | 1058 | GNUNET_SCHEDULER_cancel (n->task); |
1059 | n->task = GNUNET_SCHEDULER_add_now (&master_task, n); | 1059 | n->task = GNUNET_SCHEDULER_add_now (&master_task, n); |
1060 | } | 1060 | } |
@@ -1168,7 +1168,7 @@ disconnect_neighbour (struct NeighbourMapEntry *n) | |||
1168 | break; | 1168 | break; |
1169 | } | 1169 | } |
1170 | /* schedule timeout to clean up */ | 1170 | /* schedule timeout to clean up */ |
1171 | if (GNUNET_SCHEDULER_NO_TASK != n->task) | 1171 | if (NULL != n->task) |
1172 | GNUNET_SCHEDULER_cancel (n->task); | 1172 | GNUNET_SCHEDULER_cancel (n->task); |
1173 | n->task = GNUNET_SCHEDULER_add_delayed (DISCONNECT_SENT_TIMEOUT, | 1173 | n->task = GNUNET_SCHEDULER_add_delayed (DISCONNECT_SENT_TIMEOUT, |
1174 | &master_task, n); | 1174 | &master_task, n); |
@@ -1202,7 +1202,7 @@ transmit_send_continuation (void *cls, | |||
1202 | /* this is still "our" neighbour, remove us from its queue | 1202 | /* this is still "our" neighbour, remove us from its queue |
1203 | and allow it to send the next message now */ | 1203 | and allow it to send the next message now */ |
1204 | n->is_active = NULL; | 1204 | n->is_active = NULL; |
1205 | if (GNUNET_SCHEDULER_NO_TASK != n->task) | 1205 | if (NULL != n->task) |
1206 | GNUNET_SCHEDULER_cancel (n->task); | 1206 | GNUNET_SCHEDULER_cancel (n->task); |
1207 | n->task = GNUNET_SCHEDULER_add_now (&master_task, n); | 1207 | n->task = GNUNET_SCHEDULER_add_now (&master_task, n); |
1208 | } | 1208 | } |
@@ -1650,7 +1650,7 @@ GST_neighbours_send (const struct GNUNET_PeerIdentity *target, const void *msg, | |||
1650 | msg_size, GNUNET_i2s (target)); | 1650 | msg_size, GNUNET_i2s (target)); |
1651 | 1651 | ||
1652 | GNUNET_CONTAINER_DLL_insert_tail (n->messages_head, n->messages_tail, mq); | 1652 | GNUNET_CONTAINER_DLL_insert_tail (n->messages_head, n->messages_tail, mq); |
1653 | if (GNUNET_SCHEDULER_NO_TASK != n->task) | 1653 | if (NULL != n->task) |
1654 | GNUNET_SCHEDULER_cancel (n->task); | 1654 | GNUNET_SCHEDULER_cancel (n->task); |
1655 | n->task = GNUNET_SCHEDULER_add_now (&master_task, n); | 1655 | n->task = GNUNET_SCHEDULER_add_now (&master_task, n); |
1656 | } | 1656 | } |
@@ -2862,7 +2862,7 @@ static void | |||
2862 | utilization_transmission (void *cls, | 2862 | utilization_transmission (void *cls, |
2863 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 2863 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
2864 | { | 2864 | { |
2865 | util_transmission_tk = GNUNET_SCHEDULER_NO_TASK; | 2865 | util_transmission_tk = NULL; |
2866 | 2866 | ||
2867 | if (0 < GNUNET_CONTAINER_multipeermap_size (neighbours)) | 2867 | if (0 < GNUNET_CONTAINER_multipeermap_size (neighbours)) |
2868 | GNUNET_CONTAINER_multipeermap_iterate (neighbours, send_utilization_data, NULL); | 2868 | GNUNET_CONTAINER_multipeermap_iterate (neighbours, send_utilization_data, NULL); |
@@ -2945,7 +2945,7 @@ master_task (void *cls, | |||
2945 | struct NeighbourMapEntry *n = cls; | 2945 | struct NeighbourMapEntry *n = cls; |
2946 | struct GNUNET_TIME_Relative delay; | 2946 | struct GNUNET_TIME_Relative delay; |
2947 | 2947 | ||
2948 | n->task = GNUNET_SCHEDULER_NO_TASK; | 2948 | n->task = NULL; |
2949 | delay = GNUNET_TIME_absolute_get_remaining (n->timeout); | 2949 | delay = GNUNET_TIME_absolute_get_remaining (n->timeout); |
2950 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2950 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2951 | "Master task runs for neighbour `%s' in state %s with timeout in %s\n", | 2951 | "Master task runs for neighbour `%s' in state %s with timeout in %s\n", |
@@ -3081,7 +3081,7 @@ master_task (void *cls, | |||
3081 | delay = GNUNET_TIME_relative_min (GNUNET_TIME_absolute_get_remaining (n->keep_alive_time), | 3081 | delay = GNUNET_TIME_relative_min (GNUNET_TIME_absolute_get_remaining (n->keep_alive_time), |
3082 | delay); | 3082 | delay); |
3083 | } | 3083 | } |
3084 | if (GNUNET_SCHEDULER_NO_TASK == n->task) | 3084 | if (NULL == n->task) |
3085 | n->task = GNUNET_SCHEDULER_add_delayed (delay, | 3085 | n->task = GNUNET_SCHEDULER_add_delayed (delay, |
3086 | &master_task, | 3086 | &master_task, |
3087 | n); | 3087 | n); |
@@ -3405,7 +3405,7 @@ GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer, | |||
3405 | GNUNET_break (0); | 3405 | GNUNET_break (0); |
3406 | break; | 3406 | break; |
3407 | } | 3407 | } |
3408 | if (GNUNET_SCHEDULER_NO_TASK != n->task) | 3408 | if (NULL != n->task) |
3409 | GNUNET_SCHEDULER_cancel (n->task); | 3409 | GNUNET_SCHEDULER_cancel (n->task); |
3410 | n->task = GNUNET_SCHEDULER_add_now (&master_task, n); | 3410 | n->task = GNUNET_SCHEDULER_add_now (&master_task, n); |
3411 | return GNUNET_YES; | 3411 | return GNUNET_YES; |
@@ -3577,7 +3577,7 @@ void delayed_disconnect (void *cls, | |||
3577 | { | 3577 | { |
3578 | struct NeighbourMapEntry *n = cls; | 3578 | struct NeighbourMapEntry *n = cls; |
3579 | 3579 | ||
3580 | n->delayed_disconnect_task = GNUNET_SCHEDULER_NO_TASK; | 3580 | n->delayed_disconnect_task = NULL; |
3581 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 3581 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
3582 | "Disconnecting by request from peer %s\n", | 3582 | "Disconnecting by request from peer %s\n", |
3583 | GNUNET_i2s (&n->id)); | 3583 | GNUNET_i2s (&n->id)); |
@@ -3884,10 +3884,10 @@ GST_neighbours_stop () | |||
3884 | 3884 | ||
3885 | if (NULL == neighbours) | 3885 | if (NULL == neighbours) |
3886 | return; | 3886 | return; |
3887 | if (GNUNET_SCHEDULER_NO_TASK != util_transmission_tk) | 3887 | if (NULL != util_transmission_tk) |
3888 | { | 3888 | { |
3889 | GNUNET_SCHEDULER_cancel (util_transmission_tk); | 3889 | GNUNET_SCHEDULER_cancel (util_transmission_tk); |
3890 | util_transmission_tk = GNUNET_SCHEDULER_NO_TASK; | 3890 | util_transmission_tk = NULL; |
3891 | } | 3891 | } |
3892 | 3892 | ||
3893 | GNUNET_CONTAINER_multipeermap_iterate (neighbours, &disconnect_all_neighbours, | 3893 | GNUNET_CONTAINER_multipeermap_iterate (neighbours, &disconnect_all_neighbours, |
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index 3c7edd140..a6a591c84 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c | |||
@@ -206,12 +206,12 @@ struct ValidationEntry | |||
206 | /** | 206 | /** |
207 | * ID of task that will clean up this entry if nothing happens. | 207 | * ID of task that will clean up this entry if nothing happens. |
208 | */ | 208 | */ |
209 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 209 | struct GNUNET_SCHEDULER_Task * timeout_task; |
210 | 210 | ||
211 | /** | 211 | /** |
212 | * ID of task that will trigger address revalidation. | 212 | * ID of task that will trigger address revalidation. |
213 | */ | 213 | */ |
214 | GNUNET_SCHEDULER_TaskIdentifier revalidation_task; | 214 | struct GNUNET_SCHEDULER_Task * revalidation_task; |
215 | 215 | ||
216 | /** | 216 | /** |
217 | * At what time did we send the latest validation request (PING)? | 217 | * At what time did we send the latest validation request (PING)? |
@@ -441,15 +441,15 @@ cleanup_validation_entry (void *cls, | |||
441 | GNUNET_CONTAINER_multipeermap_remove (validation_map, | 441 | GNUNET_CONTAINER_multipeermap_remove (validation_map, |
442 | &ve->pid, ve)); | 442 | &ve->pid, ve)); |
443 | GNUNET_HELLO_address_free (ve->address); | 443 | GNUNET_HELLO_address_free (ve->address); |
444 | if (GNUNET_SCHEDULER_NO_TASK != ve->timeout_task) | 444 | if (NULL != ve->timeout_task) |
445 | { | 445 | { |
446 | GNUNET_SCHEDULER_cancel (ve->timeout_task); | 446 | GNUNET_SCHEDULER_cancel (ve->timeout_task); |
447 | ve->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 447 | ve->timeout_task = NULL; |
448 | } | 448 | } |
449 | if (GNUNET_SCHEDULER_NO_TASK != ve->revalidation_task) | 449 | if (NULL != ve->revalidation_task) |
450 | { | 450 | { |
451 | GNUNET_SCHEDULER_cancel (ve->revalidation_task); | 451 | GNUNET_SCHEDULER_cancel (ve->revalidation_task); |
452 | ve->revalidation_task = GNUNET_SCHEDULER_NO_TASK; | 452 | ve->revalidation_task = NULL; |
453 | } | 453 | } |
454 | if ((GNUNET_YES == ve->expecting_pong) && | 454 | if ((GNUNET_YES == ve->expecting_pong) && |
455 | (validations_running > 0)) | 455 | (validations_running > 0)) |
@@ -479,7 +479,7 @@ timeout_hello_validation (void *cls, | |||
479 | struct GNUNET_TIME_Absolute max; | 479 | struct GNUNET_TIME_Absolute max; |
480 | struct GNUNET_TIME_Relative left; | 480 | struct GNUNET_TIME_Relative left; |
481 | 481 | ||
482 | ve->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 482 | ve->timeout_task = NULL; |
483 | max = GNUNET_TIME_absolute_max (ve->valid_until, ve->revalidation_block); | 483 | max = GNUNET_TIME_absolute_max (ve->valid_until, ve->revalidation_block); |
484 | left = GNUNET_TIME_absolute_get_remaining (max); | 484 | left = GNUNET_TIME_absolute_get_remaining (max); |
485 | if (left.rel_value_us > 0) | 485 | if (left.rel_value_us > 0) |
@@ -653,7 +653,7 @@ revalidate_address (void *cls, | |||
653 | struct GST_BlacklistCheck *bc; | 653 | struct GST_BlacklistCheck *bc; |
654 | uint32_t rdelay; | 654 | uint32_t rdelay; |
655 | 655 | ||
656 | ve->revalidation_task = GNUNET_SCHEDULER_NO_TASK; | 656 | ve->revalidation_task = NULL; |
657 | delay = GNUNET_TIME_absolute_get_remaining (ve->revalidation_block); | 657 | delay = GNUNET_TIME_absolute_get_remaining (ve->revalidation_block); |
658 | /* How long until we can possibly permit the next PING? */ | 658 | /* How long until we can possibly permit the next PING? */ |
659 | if (GNUNET_YES == ve->in_use) | 659 | if (GNUNET_YES == ve->in_use) |
@@ -816,7 +816,7 @@ add_valid_address (void *cls, | |||
816 | ve = find_validation_entry (&public_key, address); | 816 | ve = find_validation_entry (&public_key, address); |
817 | ve->valid_until = GNUNET_TIME_absolute_max (ve->valid_until, expiration); | 817 | ve->valid_until = GNUNET_TIME_absolute_max (ve->valid_until, expiration); |
818 | 818 | ||
819 | if (GNUNET_SCHEDULER_NO_TASK == ve->revalidation_task) | 819 | if (NULL == ve->revalidation_task) |
820 | { | 820 | { |
821 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 821 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
822 | "Starting revalidations for valid address `%s'\n", | 822 | "Starting revalidations for valid address `%s'\n", |
@@ -1270,7 +1270,7 @@ validate_address_iterator (void *cls, | |||
1270 | if (papi == NULL) | 1270 | if (papi == NULL) |
1271 | { | 1271 | { |
1272 | /* This plugin is currently unvailable ... retry later */ | 1272 | /* This plugin is currently unvailable ... retry later */ |
1273 | if (GNUNET_SCHEDULER_NO_TASK == ve->revalidation_task) | 1273 | if (NULL == ve->revalidation_task) |
1274 | { | 1274 | { |
1275 | if (GNUNET_YES == ve->in_use) | 1275 | if (GNUNET_YES == ve->in_use) |
1276 | canonical_delay = CONNECTED_PING_FREQUENCY; | 1276 | canonical_delay = CONNECTED_PING_FREQUENCY; |
@@ -1292,7 +1292,7 @@ validate_address_iterator (void *cls, | |||
1292 | } | 1292 | } |
1293 | 1293 | ||
1294 | 1294 | ||
1295 | if (GNUNET_SCHEDULER_NO_TASK == ve->revalidation_task) | 1295 | if (NULL == ve->revalidation_task) |
1296 | { | 1296 | { |
1297 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 1297 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
1298 | "Validation process started for fresh address `%s'\n", | 1298 | "Validation process started for fresh address `%s'\n", |
diff --git a/src/transport/gnunet-transport-profiler.c b/src/transport/gnunet-transport-profiler.c index fc3c32a40..c785653c8 100644 --- a/src/transport/gnunet-transport-profiler.c +++ b/src/transport/gnunet-transport-profiler.c | |||
@@ -142,7 +142,7 @@ static struct GNUNET_PeerIdentity pid; | |||
142 | /** | 142 | /** |
143 | * Task scheduled for cleanup / termination of the process. | 143 | * Task scheduled for cleanup / termination of the process. |
144 | */ | 144 | */ |
145 | static GNUNET_SCHEDULER_TaskIdentifier end; | 145 | static struct GNUNET_SCHEDULER_Task * end; |
146 | 146 | ||
147 | /** | 147 | /** |
148 | * Selected level of verbosity. | 148 | * Selected level of verbosity. |
@@ -370,7 +370,7 @@ iteration_done () | |||
370 | if (it_count == benchmark_iterations) | 370 | if (it_count == benchmark_iterations) |
371 | { | 371 | { |
372 | benchmark_running = GNUNET_NO; | 372 | benchmark_running = GNUNET_NO; |
373 | if (GNUNET_SCHEDULER_NO_TASK != end) | 373 | if (NULL != end) |
374 | GNUNET_SCHEDULER_cancel (end); | 374 | GNUNET_SCHEDULER_cancel (end); |
375 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); | 375 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); |
376 | return; | 376 | return; |
@@ -490,7 +490,7 @@ try_connect_cb (void *cls, | |||
490 | FPRINTF (stderr, | 490 | FPRINTF (stderr, |
491 | "%s", | 491 | "%s", |
492 | _("Failed to send connect request to transport service\n")); | 492 | _("Failed to send connect request to transport service\n")); |
493 | if (GNUNET_SCHEDULER_NO_TASK != end) | 493 | if (NULL != end) |
494 | GNUNET_SCHEDULER_cancel (end); | 494 | GNUNET_SCHEDULER_cancel (end); |
495 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); | 495 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); |
496 | ret = 1; | 496 | ret = 1; |
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c index cd74abde7..635213c29 100644 --- a/src/transport/gnunet-transport.c +++ b/src/transport/gnunet-transport.c | |||
@@ -208,7 +208,7 @@ struct TestContext | |||
208 | /** | 208 | /** |
209 | * Task identifier for the timeout. | 209 | * Task identifier for the timeout. |
210 | */ | 210 | */ |
211 | GNUNET_SCHEDULER_TaskIdentifier tsk; | 211 | struct GNUNET_SCHEDULER_Task * tsk; |
212 | 212 | ||
213 | /** | 213 | /** |
214 | * Name of plugin under test. | 214 | * Name of plugin under test. |
@@ -424,12 +424,12 @@ static struct GNUNET_PeerIdentity pid; | |||
424 | /** | 424 | /** |
425 | * Task scheduled for cleanup / termination of the process. | 425 | * Task scheduled for cleanup / termination of the process. |
426 | */ | 426 | */ |
427 | static GNUNET_SCHEDULER_TaskIdentifier end; | 427 | static struct GNUNET_SCHEDULER_Task * end; |
428 | 428 | ||
429 | /** | 429 | /** |
430 | * Task for operation timeout | 430 | * Task for operation timeout |
431 | */ | 431 | */ |
432 | static GNUNET_SCHEDULER_TaskIdentifier op_timeout; | 432 | static struct GNUNET_SCHEDULER_Task * op_timeout; |
433 | 433 | ||
434 | /** | 434 | /** |
435 | * Selected level of verbosity. | 435 | * Selected level of verbosity. |
@@ -522,11 +522,11 @@ shutdown_task (void *cls, | |||
522 | struct ValidationResolutionContext *cur; | 522 | struct ValidationResolutionContext *cur; |
523 | struct ValidationResolutionContext *next; | 523 | struct ValidationResolutionContext *next; |
524 | 524 | ||
525 | end = GNUNET_SCHEDULER_NO_TASK; | 525 | end = NULL; |
526 | if (GNUNET_SCHEDULER_NO_TASK != op_timeout) | 526 | if (NULL != op_timeout) |
527 | { | 527 | { |
528 | GNUNET_SCHEDULER_cancel (op_timeout); | 528 | GNUNET_SCHEDULER_cancel (op_timeout); |
529 | op_timeout = GNUNET_SCHEDULER_NO_TASK; | 529 | op_timeout = NULL; |
530 | } | 530 | } |
531 | if (NULL != tc_handle) | 531 | if (NULL != tc_handle) |
532 | { | 532 | { |
@@ -612,13 +612,13 @@ operation_timeout (void *cls, | |||
612 | { | 612 | { |
613 | struct PeerResolutionContext *cur; | 613 | struct PeerResolutionContext *cur; |
614 | struct PeerResolutionContext *next; | 614 | struct PeerResolutionContext *next; |
615 | op_timeout = GNUNET_SCHEDULER_NO_TASK; | 615 | op_timeout = NULL; |
616 | if ((try_connect) || (benchmark_send) || (benchmark_receive)) | 616 | if ((try_connect) || (benchmark_send) || (benchmark_receive)) |
617 | { | 617 | { |
618 | FPRINTF (stdout, | 618 | FPRINTF (stdout, |
619 | _("Failed to connect to `%s'\n"), | 619 | _("Failed to connect to `%s'\n"), |
620 | GNUNET_i2s_full (&pid)); | 620 | GNUNET_i2s_full (&pid)); |
621 | if (GNUNET_SCHEDULER_NO_TASK != end) | 621 | if (NULL != end) |
622 | GNUNET_SCHEDULER_cancel (end); | 622 | GNUNET_SCHEDULER_cancel (end); |
623 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); | 623 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); |
624 | ret = 1; | 624 | ret = 1; |
@@ -644,7 +644,7 @@ operation_timeout (void *cls, | |||
644 | FPRINTF (stdout, | 644 | FPRINTF (stdout, |
645 | "%s", | 645 | "%s", |
646 | _("Failed to list connections, timeout occured\n")); | 646 | _("Failed to list connections, timeout occured\n")); |
647 | if (GNUNET_SCHEDULER_NO_TASK != end) | 647 | if (NULL != end) |
648 | GNUNET_SCHEDULER_cancel (end); | 648 | GNUNET_SCHEDULER_cancel (end); |
649 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); | 649 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); |
650 | ret = 1; | 650 | ret = 1; |
@@ -709,10 +709,10 @@ display_test_result (struct TestContext *tc, | |||
709 | _("Configuration for plugin `%s' is working!\n"), | 709 | _("Configuration for plugin `%s' is working!\n"), |
710 | tc->name); | 710 | tc->name); |
711 | } | 711 | } |
712 | if (GNUNET_SCHEDULER_NO_TASK != tc->tsk) | 712 | if (NULL != tc->tsk) |
713 | { | 713 | { |
714 | GNUNET_SCHEDULER_cancel (tc->tsk); | 714 | GNUNET_SCHEDULER_cancel (tc->tsk); |
715 | tc->tsk = GNUNET_SCHEDULER_NO_TASK; | 715 | tc->tsk = NULL; |
716 | } | 716 | } |
717 | if (NULL != tc->tst) | 717 | if (NULL != tc->tst) |
718 | { | 718 | { |
@@ -873,15 +873,15 @@ process_validation_string (void *cls, | |||
873 | GNUNET_free (vc); | 873 | GNUNET_free (vc); |
874 | if ((0 == address_resolutions) && (iterate_validation)) | 874 | if ((0 == address_resolutions) && (iterate_validation)) |
875 | { | 875 | { |
876 | if (GNUNET_SCHEDULER_NO_TASK != end) | 876 | if (NULL != end) |
877 | { | 877 | { |
878 | GNUNET_SCHEDULER_cancel (end); | 878 | GNUNET_SCHEDULER_cancel (end); |
879 | end = GNUNET_SCHEDULER_NO_TASK; | 879 | end = NULL; |
880 | } | 880 | } |
881 | if (GNUNET_SCHEDULER_NO_TASK != op_timeout) | 881 | if (NULL != op_timeout) |
882 | { | 882 | { |
883 | GNUNET_SCHEDULER_cancel (op_timeout); | 883 | GNUNET_SCHEDULER_cancel (op_timeout); |
884 | op_timeout = GNUNET_SCHEDULER_NO_TASK; | 884 | op_timeout = NULL; |
885 | } | 885 | } |
886 | ret = 0; | 886 | ret = 0; |
887 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); | 887 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); |
@@ -966,7 +966,7 @@ process_validation_cb (void *cls, | |||
966 | 966 | ||
967 | /* done */ | 967 | /* done */ |
968 | vic = NULL; | 968 | vic = NULL; |
969 | if (GNUNET_SCHEDULER_NO_TASK != end) | 969 | if (NULL != end) |
970 | GNUNET_SCHEDULER_cancel (end); | 970 | GNUNET_SCHEDULER_cancel (end); |
971 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); | 971 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); |
972 | return; | 972 | return; |
@@ -975,7 +975,7 @@ process_validation_cb (void *cls, | |||
975 | { | 975 | { |
976 | /* invalid response */ | 976 | /* invalid response */ |
977 | vic = NULL; | 977 | vic = NULL; |
978 | if (GNUNET_SCHEDULER_NO_TASK != end) | 978 | if (NULL != end) |
979 | GNUNET_SCHEDULER_cancel (end); | 979 | GNUNET_SCHEDULER_cancel (end); |
980 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); | 980 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); |
981 | return; | 981 | return; |
@@ -1140,23 +1140,23 @@ notify_connect (void *cls, | |||
1140 | GNUNET_i2s_full (peer)); | 1140 | GNUNET_i2s_full (peer)); |
1141 | ret = 0; | 1141 | ret = 0; |
1142 | 1142 | ||
1143 | if (GNUNET_SCHEDULER_NO_TASK != op_timeout) | 1143 | if (NULL != op_timeout) |
1144 | { | 1144 | { |
1145 | GNUNET_SCHEDULER_cancel (op_timeout); | 1145 | GNUNET_SCHEDULER_cancel (op_timeout); |
1146 | op_timeout = GNUNET_SCHEDULER_NO_TASK; | 1146 | op_timeout = NULL; |
1147 | } | 1147 | } |
1148 | 1148 | ||
1149 | if (GNUNET_SCHEDULER_NO_TASK != end) | 1149 | if (NULL != end) |
1150 | GNUNET_SCHEDULER_cancel (end); | 1150 | GNUNET_SCHEDULER_cancel (end); |
1151 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); | 1151 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); |
1152 | return; | 1152 | return; |
1153 | } | 1153 | } |
1154 | if (benchmark_send) | 1154 | if (benchmark_send) |
1155 | { | 1155 | { |
1156 | if (GNUNET_SCHEDULER_NO_TASK != op_timeout) | 1156 | if (NULL != op_timeout) |
1157 | { | 1157 | { |
1158 | GNUNET_SCHEDULER_cancel (op_timeout); | 1158 | GNUNET_SCHEDULER_cancel (op_timeout); |
1159 | op_timeout = GNUNET_SCHEDULER_NO_TASK; | 1159 | op_timeout = NULL; |
1160 | } | 1160 | } |
1161 | if (verbosity > 0) | 1161 | if (verbosity > 0) |
1162 | FPRINTF (stdout, | 1162 | FPRINTF (stdout, |
@@ -1197,13 +1197,13 @@ notify_disconnect (void *cls, | |||
1197 | GNUNET_i2s_full (peer)); | 1197 | GNUNET_i2s_full (peer)); |
1198 | ret = 0; | 1198 | ret = 0; |
1199 | 1199 | ||
1200 | if (GNUNET_SCHEDULER_NO_TASK != op_timeout) | 1200 | if (NULL != op_timeout) |
1201 | { | 1201 | { |
1202 | GNUNET_SCHEDULER_cancel (op_timeout); | 1202 | GNUNET_SCHEDULER_cancel (op_timeout); |
1203 | op_timeout = GNUNET_SCHEDULER_NO_TASK; | 1203 | op_timeout = NULL; |
1204 | } | 1204 | } |
1205 | 1205 | ||
1206 | if (GNUNET_SCHEDULER_NO_TASK != end) | 1206 | if (NULL != end) |
1207 | GNUNET_SCHEDULER_cancel (end); | 1207 | GNUNET_SCHEDULER_cancel (end); |
1208 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); | 1208 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); |
1209 | return; | 1209 | return; |
@@ -1218,7 +1218,7 @@ notify_disconnect (void *cls, | |||
1218 | { | 1218 | { |
1219 | FPRINTF (stdout, _("Disconnected from peer `%s' while benchmarking\n"), | 1219 | FPRINTF (stdout, _("Disconnected from peer `%s' while benchmarking\n"), |
1220 | GNUNET_i2s (&pid)); | 1220 | GNUNET_i2s (&pid)); |
1221 | if (GNUNET_SCHEDULER_NO_TASK != end) | 1221 | if (NULL != end) |
1222 | GNUNET_SCHEDULER_cancel (end); | 1222 | GNUNET_SCHEDULER_cancel (end); |
1223 | return; | 1223 | return; |
1224 | } | 1224 | } |
@@ -1431,15 +1431,15 @@ process_peer_string (void *cls, | |||
1431 | GNUNET_free (rc); | 1431 | GNUNET_free (rc); |
1432 | if ((0 == address_resolutions) && (iterate_connections)) | 1432 | if ((0 == address_resolutions) && (iterate_connections)) |
1433 | { | 1433 | { |
1434 | if (GNUNET_SCHEDULER_NO_TASK != end) | 1434 | if (NULL != end) |
1435 | { | 1435 | { |
1436 | GNUNET_SCHEDULER_cancel (end); | 1436 | GNUNET_SCHEDULER_cancel (end); |
1437 | end = GNUNET_SCHEDULER_NO_TASK; | 1437 | end = NULL; |
1438 | } | 1438 | } |
1439 | if (GNUNET_SCHEDULER_NO_TASK != op_timeout) | 1439 | if (NULL != op_timeout) |
1440 | { | 1440 | { |
1441 | GNUNET_SCHEDULER_cancel (op_timeout); | 1441 | GNUNET_SCHEDULER_cancel (op_timeout); |
1442 | op_timeout = GNUNET_SCHEDULER_NO_TASK; | 1442 | op_timeout = NULL; |
1443 | } | 1443 | } |
1444 | ret = 0; | 1444 | ret = 0; |
1445 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); | 1445 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); |
@@ -1498,7 +1498,7 @@ process_peer_iteration_cb (void *cls, | |||
1498 | /* done */ | 1498 | /* done */ |
1499 | address_resolution_in_progress = GNUNET_NO; | 1499 | address_resolution_in_progress = GNUNET_NO; |
1500 | pic = NULL; | 1500 | pic = NULL; |
1501 | if (GNUNET_SCHEDULER_NO_TASK != end) | 1501 | if (NULL != end) |
1502 | GNUNET_SCHEDULER_cancel (end); | 1502 | GNUNET_SCHEDULER_cancel (end); |
1503 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); | 1503 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); |
1504 | return; | 1504 | return; |
@@ -1508,7 +1508,7 @@ process_peer_iteration_cb (void *cls, | |||
1508 | (GNUNET_NO == GNUNET_TRANSPORT_is_connected(state))) | 1508 | (GNUNET_NO == GNUNET_TRANSPORT_is_connected(state))) |
1509 | return; /* Display only connected peers */ | 1509 | return; /* Display only connected peers */ |
1510 | 1510 | ||
1511 | if (GNUNET_SCHEDULER_NO_TASK != op_timeout) | 1511 | if (NULL != op_timeout) |
1512 | GNUNET_SCHEDULER_cancel (op_timeout); | 1512 | GNUNET_SCHEDULER_cancel (op_timeout); |
1513 | op_timeout = GNUNET_SCHEDULER_add_delayed (OP_TIMEOUT, | 1513 | op_timeout = GNUNET_SCHEDULER_add_delayed (OP_TIMEOUT, |
1514 | &operation_timeout, | 1514 | &operation_timeout, |
@@ -1713,7 +1713,7 @@ process_peer_monitoring_cb (void *cls, | |||
1713 | return; | 1713 | return; |
1714 | } | 1714 | } |
1715 | 1715 | ||
1716 | if (GNUNET_SCHEDULER_NO_TASK != op_timeout) | 1716 | if (NULL != op_timeout) |
1717 | GNUNET_SCHEDULER_cancel (op_timeout); | 1717 | GNUNET_SCHEDULER_cancel (op_timeout); |
1718 | op_timeout = GNUNET_SCHEDULER_add_delayed (OP_TIMEOUT, | 1718 | op_timeout = GNUNET_SCHEDULER_add_delayed (OP_TIMEOUT, |
1719 | &operation_timeout, | 1719 | &operation_timeout, |
@@ -1792,7 +1792,7 @@ try_connect_cb (void *cls, | |||
1792 | FPRINTF (stderr, | 1792 | FPRINTF (stderr, |
1793 | "%s", | 1793 | "%s", |
1794 | _("Failed to send connect request to transport service\n")); | 1794 | _("Failed to send connect request to transport service\n")); |
1795 | if (GNUNET_SCHEDULER_NO_TASK != end) | 1795 | if (NULL != end) |
1796 | GNUNET_SCHEDULER_cancel (end); | 1796 | GNUNET_SCHEDULER_cancel (end); |
1797 | ret = 1; | 1797 | ret = 1; |
1798 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); | 1798 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); |
@@ -1827,7 +1827,7 @@ try_disconnect_cb (void *cls, | |||
1827 | } | 1827 | } |
1828 | FPRINTF (stderr, "%s", | 1828 | FPRINTF (stderr, "%s", |
1829 | _("Failed to send disconnect request to transport service\n")); | 1829 | _("Failed to send disconnect request to transport service\n")); |
1830 | if (GNUNET_SCHEDULER_NO_TASK != end) | 1830 | if (NULL != end) |
1831 | GNUNET_SCHEDULER_cancel (end); | 1831 | GNUNET_SCHEDULER_cancel (end); |
1832 | ret = 1; | 1832 | ret = 1; |
1833 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); | 1833 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); |
diff --git a/src/transport/plugin_transport_http.h b/src/transport/plugin_transport_http.h index d43eb9bab..9a0edb719 100644 --- a/src/transport/plugin_transport_http.h +++ b/src/transport/plugin_transport_http.h | |||
@@ -118,7 +118,7 @@ struct Plugin | |||
118 | /** | 118 | /** |
119 | * Task calling transport service about external address | 119 | * Task calling transport service about external address |
120 | */ | 120 | */ |
121 | GNUNET_SCHEDULER_TaskIdentifier notify_ext_task; | 121 | struct GNUNET_SCHEDULER_Task * notify_ext_task; |
122 | 122 | ||
123 | /** | 123 | /** |
124 | * Plugin name. | 124 | * Plugin name. |
@@ -206,7 +206,7 @@ struct Plugin | |||
206 | /** | 206 | /** |
207 | * MHD IPv4 task | 207 | * MHD IPv4 task |
208 | */ | 208 | */ |
209 | GNUNET_SCHEDULER_TaskIdentifier server_v4_task; | 209 | struct GNUNET_SCHEDULER_Task * server_v4_task; |
210 | 210 | ||
211 | /** | 211 | /** |
212 | * The IPv4 server is scheduled to run asap | 212 | * The IPv4 server is scheduled to run asap |
@@ -221,7 +221,7 @@ struct Plugin | |||
221 | /** | 221 | /** |
222 | * MHD IPv4 task | 222 | * MHD IPv4 task |
223 | */ | 223 | */ |
224 | GNUNET_SCHEDULER_TaskIdentifier server_v6_task; | 224 | struct GNUNET_SCHEDULER_Task * server_v6_task; |
225 | 225 | ||
226 | /** | 226 | /** |
227 | * The IPv6 server is scheduled to run asap | 227 | * The IPv6 server is scheduled to run asap |
@@ -260,7 +260,7 @@ struct Plugin | |||
260 | /** | 260 | /** |
261 | * curl perform task | 261 | * curl perform task |
262 | */ | 262 | */ |
263 | GNUNET_SCHEDULER_TaskIdentifier client_perform_task; | 263 | struct GNUNET_SCHEDULER_Task * client_perform_task; |
264 | 264 | ||
265 | }; | 265 | }; |
266 | 266 | ||
@@ -426,12 +426,12 @@ struct Session | |||
426 | /** | 426 | /** |
427 | * Task to wake up client receive handle when receiving is allowed again | 427 | * Task to wake up client receive handle when receiving is allowed again |
428 | */ | 428 | */ |
429 | GNUNET_SCHEDULER_TaskIdentifier recv_wakeup_task; | 429 | struct GNUNET_SCHEDULER_Task * recv_wakeup_task; |
430 | 430 | ||
431 | /** | 431 | /** |
432 | * Session timeout task | 432 | * Session timeout task |
433 | */ | 433 | */ |
434 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 434 | struct GNUNET_SCHEDULER_Task * timeout_task; |
435 | 435 | ||
436 | /** | 436 | /** |
437 | * Is client send handle paused since there are no data to send? | 437 | * Is client send handle paused since there are no data to send? |
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c index 4cafaf2c0..cc1f39e9a 100644 --- a/src/transport/plugin_transport_http_client.c +++ b/src/transport/plugin_transport_http_client.c | |||
@@ -222,17 +222,17 @@ struct Session | |||
222 | /** | 222 | /** |
223 | * Session timeout task | 223 | * Session timeout task |
224 | */ | 224 | */ |
225 | GNUNET_SCHEDULER_TaskIdentifier put_disconnect_task; | 225 | struct GNUNET_SCHEDULER_Task * put_disconnect_task; |
226 | 226 | ||
227 | /** | 227 | /** |
228 | * Session timeout task | 228 | * Session timeout task |
229 | */ | 229 | */ |
230 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 230 | struct GNUNET_SCHEDULER_Task * timeout_task; |
231 | 231 | ||
232 | /** | 232 | /** |
233 | * Task to wake up client receive handle when receiving is allowed again | 233 | * Task to wake up client receive handle when receiving is allowed again |
234 | */ | 234 | */ |
235 | GNUNET_SCHEDULER_TaskIdentifier recv_wakeup_task; | 235 | struct GNUNET_SCHEDULER_Task * recv_wakeup_task; |
236 | 236 | ||
237 | /** | 237 | /** |
238 | * Absolute time when to receive data again. | 238 | * Absolute time when to receive data again. |
@@ -326,7 +326,7 @@ struct HTTP_Client_Plugin | |||
326 | /** | 326 | /** |
327 | * curl perform task | 327 | * curl perform task |
328 | */ | 328 | */ |
329 | GNUNET_SCHEDULER_TaskIdentifier client_perform_task; | 329 | struct GNUNET_SCHEDULER_Task * client_perform_task; |
330 | 330 | ||
331 | /** | 331 | /** |
332 | * Type of proxy server: | 332 | * Type of proxy server: |
@@ -440,21 +440,21 @@ client_delete_session (struct Session *s) | |||
440 | struct HTTP_Message *next; | 440 | struct HTTP_Message *next; |
441 | CURLMcode mret; | 441 | CURLMcode mret; |
442 | 442 | ||
443 | if (GNUNET_SCHEDULER_NO_TASK != s->timeout_task) | 443 | if (NULL != s->timeout_task) |
444 | { | 444 | { |
445 | GNUNET_SCHEDULER_cancel (s->timeout_task); | 445 | GNUNET_SCHEDULER_cancel (s->timeout_task); |
446 | s->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 446 | s->timeout_task = NULL; |
447 | s->timeout = GNUNET_TIME_UNIT_ZERO_ABS; | 447 | s->timeout = GNUNET_TIME_UNIT_ZERO_ABS; |
448 | } | 448 | } |
449 | if (GNUNET_SCHEDULER_NO_TASK != s->put_disconnect_task) | 449 | if (NULL != s->put_disconnect_task) |
450 | { | 450 | { |
451 | GNUNET_SCHEDULER_cancel (s->put_disconnect_task); | 451 | GNUNET_SCHEDULER_cancel (s->put_disconnect_task); |
452 | s->put_disconnect_task = GNUNET_SCHEDULER_NO_TASK; | 452 | s->put_disconnect_task = NULL; |
453 | } | 453 | } |
454 | if (GNUNET_SCHEDULER_NO_TASK != s->recv_wakeup_task) | 454 | if (NULL != s->recv_wakeup_task) |
455 | { | 455 | { |
456 | GNUNET_SCHEDULER_cancel (s->recv_wakeup_task); | 456 | GNUNET_SCHEDULER_cancel (s->recv_wakeup_task); |
457 | s->recv_wakeup_task = GNUNET_SCHEDULER_NO_TASK; | 457 | s->recv_wakeup_task = NULL; |
458 | } | 458 | } |
459 | GNUNET_assert (GNUNET_OK == | 459 | GNUNET_assert (GNUNET_OK == |
460 | GNUNET_CONTAINER_multipeermap_remove (plugin->sessions, | 460 | GNUNET_CONTAINER_multipeermap_remove (plugin->sessions, |
@@ -541,7 +541,7 @@ client_delete_session (struct Session *s) | |||
541 | static void | 541 | static void |
542 | client_reschedule_session_timeout (struct Session *s) | 542 | client_reschedule_session_timeout (struct Session *s) |
543 | { | 543 | { |
544 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != s->timeout_task); | 544 | GNUNET_assert (NULL != s->timeout_task); |
545 | s->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); | 545 | s->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); |
546 | } | 546 | } |
547 | 547 | ||
@@ -579,10 +579,10 @@ client_schedule (struct HTTP_Client_Plugin *plugin, | |||
579 | struct GNUNET_TIME_Relative timeout; | 579 | struct GNUNET_TIME_Relative timeout; |
580 | 580 | ||
581 | /* Cancel previous scheduled task */ | 581 | /* Cancel previous scheduled task */ |
582 | if (plugin->client_perform_task != GNUNET_SCHEDULER_NO_TASK) | 582 | if (plugin->client_perform_task != NULL) |
583 | { | 583 | { |
584 | GNUNET_SCHEDULER_cancel (plugin->client_perform_task); | 584 | GNUNET_SCHEDULER_cancel (plugin->client_perform_task); |
585 | plugin->client_perform_task = GNUNET_SCHEDULER_NO_TASK; | 585 | plugin->client_perform_task = NULL; |
586 | } | 586 | } |
587 | max = -1; | 587 | max = -1; |
588 | FD_ZERO (&rs); | 588 | FD_ZERO (&rs); |
@@ -802,9 +802,9 @@ http_client_plugin_send (void *cls, | |||
802 | if (H_PAUSED == s->put.state) | 802 | if (H_PAUSED == s->put.state) |
803 | { | 803 | { |
804 | /* PUT request was paused, unpause */ | 804 | /* PUT request was paused, unpause */ |
805 | GNUNET_assert (s->put_disconnect_task != GNUNET_SCHEDULER_NO_TASK); | 805 | GNUNET_assert (s->put_disconnect_task != NULL); |
806 | GNUNET_SCHEDULER_cancel (s->put_disconnect_task); | 806 | GNUNET_SCHEDULER_cancel (s->put_disconnect_task); |
807 | s->put_disconnect_task = GNUNET_SCHEDULER_NO_TASK; | 807 | s->put_disconnect_task = NULL; |
808 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 808 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
809 | "Session %p/request %p: unpausing request\n", | 809 | "Session %p/request %p: unpausing request\n", |
810 | s, s->put.easyhandle); | 810 | s, s->put.easyhandle); |
@@ -851,10 +851,10 @@ http_client_plugin_session_disconnect (void *cls, | |||
851 | client_delete_session (s); | 851 | client_delete_session (s); |
852 | 852 | ||
853 | /* Re-schedule since handles have changed */ | 853 | /* Re-schedule since handles have changed */ |
854 | if (plugin->client_perform_task != GNUNET_SCHEDULER_NO_TASK) | 854 | if (plugin->client_perform_task != NULL) |
855 | { | 855 | { |
856 | GNUNET_SCHEDULER_cancel (plugin->client_perform_task); | 856 | GNUNET_SCHEDULER_cancel (plugin->client_perform_task); |
857 | plugin->client_perform_task = GNUNET_SCHEDULER_NO_TASK; | 857 | plugin->client_perform_task = NULL; |
858 | } | 858 | } |
859 | client_schedule (plugin, GNUNET_YES); | 859 | client_schedule (plugin, GNUNET_YES); |
860 | 860 | ||
@@ -1001,7 +1001,7 @@ client_put_disconnect (void *cls, | |||
1001 | { | 1001 | { |
1002 | struct Session *s = cls; | 1002 | struct Session *s = cls; |
1003 | 1003 | ||
1004 | s->put_disconnect_task = GNUNET_SCHEDULER_NO_TASK; | 1004 | s->put_disconnect_task = NULL; |
1005 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1005 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1006 | "Session %p/request %p: will be disconnected due to no activity\n", | 1006 | "Session %p/request %p: will be disconnected due to no activity\n", |
1007 | s, s->put.easyhandle); | 1007 | s, s->put.easyhandle); |
@@ -1132,7 +1132,7 @@ client_wake_up (void *cls, | |||
1132 | { | 1132 | { |
1133 | struct Session *s = cls; | 1133 | struct Session *s = cls; |
1134 | 1134 | ||
1135 | s->recv_wakeup_task = GNUNET_SCHEDULER_NO_TASK; | 1135 | s->recv_wakeup_task = NULL; |
1136 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1136 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1137 | return; | 1137 | return; |
1138 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1138 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1141,9 +1141,9 @@ client_wake_up (void *cls, | |||
1141 | if (H_PAUSED == s->put.state) | 1141 | if (H_PAUSED == s->put.state) |
1142 | { | 1142 | { |
1143 | /* PUT request was paused, unpause */ | 1143 | /* PUT request was paused, unpause */ |
1144 | GNUNET_assert (s->put_disconnect_task != GNUNET_SCHEDULER_NO_TASK); | 1144 | GNUNET_assert (s->put_disconnect_task != NULL); |
1145 | GNUNET_SCHEDULER_cancel (s->put_disconnect_task); | 1145 | GNUNET_SCHEDULER_cancel (s->put_disconnect_task); |
1146 | s->put_disconnect_task = GNUNET_SCHEDULER_NO_TASK; | 1146 | s->put_disconnect_task = NULL; |
1147 | s->put.state = H_CONNECTED; | 1147 | s->put.state = H_CONNECTED; |
1148 | if (NULL != s->put.easyhandle) | 1148 | if (NULL != s->put.easyhandle) |
1149 | curl_easy_pause (s->put.easyhandle, CURLPAUSE_CONT); | 1149 | curl_easy_pause (s->put.easyhandle, CURLPAUSE_CONT); |
@@ -1271,10 +1271,10 @@ client_receive (void *stream, | |||
1271 | s->get.easyhandle, | 1271 | s->get.easyhandle, |
1272 | GNUNET_STRINGS_relative_time_to_string (delta, | 1272 | GNUNET_STRINGS_relative_time_to_string (delta, |
1273 | GNUNET_YES)); | 1273 | GNUNET_YES)); |
1274 | if (s->recv_wakeup_task != GNUNET_SCHEDULER_NO_TASK) | 1274 | if (s->recv_wakeup_task != NULL) |
1275 | { | 1275 | { |
1276 | GNUNET_SCHEDULER_cancel (s->recv_wakeup_task); | 1276 | GNUNET_SCHEDULER_cancel (s->recv_wakeup_task); |
1277 | s->recv_wakeup_task = GNUNET_SCHEDULER_NO_TASK; | 1277 | s->recv_wakeup_task = NULL; |
1278 | } | 1278 | } |
1279 | s->recv_wakeup_task | 1279 | s->recv_wakeup_task |
1280 | = GNUNET_SCHEDULER_add_delayed (delta, | 1280 | = GNUNET_SCHEDULER_add_delayed (delta, |
@@ -1313,7 +1313,7 @@ client_run (void *cls, | |||
1313 | int put_request; /* GNUNET_YES if easy handle is put, GNUNET_NO for get */ | 1313 | int put_request; /* GNUNET_YES if easy handle is put, GNUNET_NO for get */ |
1314 | int msgs_left; | 1314 | int msgs_left; |
1315 | 1315 | ||
1316 | plugin->client_perform_task = GNUNET_SCHEDULER_NO_TASK; | 1316 | plugin->client_perform_task = NULL; |
1317 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1317 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1318 | return; | 1318 | return; |
1319 | 1319 | ||
@@ -1918,10 +1918,10 @@ client_connect (struct Session *s) | |||
1918 | plugin->cur_requests, | 1918 | plugin->cur_requests, |
1919 | GNUNET_NO); | 1919 | GNUNET_NO); |
1920 | /* Re-schedule since handles have changed */ | 1920 | /* Re-schedule since handles have changed */ |
1921 | if (plugin->client_perform_task != GNUNET_SCHEDULER_NO_TASK) | 1921 | if (plugin->client_perform_task != NULL) |
1922 | { | 1922 | { |
1923 | GNUNET_SCHEDULER_cancel (plugin->client_perform_task); | 1923 | GNUNET_SCHEDULER_cancel (plugin->client_perform_task); |
1924 | plugin->client_perform_task = GNUNET_SCHEDULER_NO_TASK; | 1924 | plugin->client_perform_task = NULL; |
1925 | } | 1925 | } |
1926 | 1926 | ||
1927 | /* Schedule task to run immediately */ | 1927 | /* Schedule task to run immediately */ |
@@ -1958,7 +1958,7 @@ client_session_timeout (void *cls, | |||
1958 | struct Session *s = cls; | 1958 | struct Session *s = cls; |
1959 | struct GNUNET_TIME_Relative left; | 1959 | struct GNUNET_TIME_Relative left; |
1960 | 1960 | ||
1961 | s->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 1961 | s->timeout_task = NULL; |
1962 | left = GNUNET_TIME_absolute_get_remaining (s->timeout); | 1962 | left = GNUNET_TIME_absolute_get_remaining (s->timeout); |
1963 | if (0 != left.rel_value_us) | 1963 | if (0 != left.rel_value_us) |
1964 | { | 1964 | { |
@@ -2166,10 +2166,10 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) | |||
2166 | GNUNET_CONTAINER_multipeermap_iterate (plugin->sessions, | 2166 | GNUNET_CONTAINER_multipeermap_iterate (plugin->sessions, |
2167 | &destroy_session_cb, | 2167 | &destroy_session_cb, |
2168 | plugin); | 2168 | plugin); |
2169 | if (GNUNET_SCHEDULER_NO_TASK != plugin->client_perform_task) | 2169 | if (NULL != plugin->client_perform_task) |
2170 | { | 2170 | { |
2171 | GNUNET_SCHEDULER_cancel (plugin->client_perform_task); | 2171 | GNUNET_SCHEDULER_cancel (plugin->client_perform_task); |
2172 | plugin->client_perform_task = GNUNET_SCHEDULER_NO_TASK; | 2172 | plugin->client_perform_task = NULL; |
2173 | } | 2173 | } |
2174 | if (NULL != plugin->curl_multi_handle) | 2174 | if (NULL != plugin->curl_multi_handle) |
2175 | { | 2175 | { |
@@ -2368,7 +2368,7 @@ http_client_plugin_update_inbound_delay (void *cls, | |||
2368 | "New inbound delay %s\n", | 2368 | "New inbound delay %s\n", |
2369 | GNUNET_STRINGS_relative_time_to_string (delay, | 2369 | GNUNET_STRINGS_relative_time_to_string (delay, |
2370 | GNUNET_NO)); | 2370 | GNUNET_NO)); |
2371 | if (s->recv_wakeup_task != GNUNET_SCHEDULER_NO_TASK) | 2371 | if (s->recv_wakeup_task != NULL) |
2372 | { | 2372 | { |
2373 | GNUNET_SCHEDULER_cancel (s->recv_wakeup_task); | 2373 | GNUNET_SCHEDULER_cancel (s->recv_wakeup_task); |
2374 | s->recv_wakeup_task = GNUNET_SCHEDULER_add_delayed (delay, | 2374 | s->recv_wakeup_task = GNUNET_SCHEDULER_add_delayed (delay, |
diff --git a/src/transport/plugin_transport_http_common.c b/src/transport/plugin_transport_http_common.c index acccf39f8..bd6838e1c 100644 --- a/src/transport/plugin_transport_http_common.c +++ b/src/transport/plugin_transport_http_common.c | |||
@@ -205,7 +205,7 @@ struct PrettyPrinterContext | |||
205 | /** | 205 | /** |
206 | * Timeout task | 206 | * Timeout task |
207 | */ | 207 | */ |
208 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 208 | struct GNUNET_SCHEDULER_Task * timeout_task; |
209 | 209 | ||
210 | /** | 210 | /** |
211 | * Splitted Address | 211 | * Splitted Address |
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index 31bd7ba4f..aaa17b2cf 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c | |||
@@ -232,12 +232,12 @@ struct Session | |||
232 | /** | 232 | /** |
233 | * Session timeout task | 233 | * Session timeout task |
234 | */ | 234 | */ |
235 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 235 | struct GNUNET_SCHEDULER_Task * timeout_task; |
236 | 236 | ||
237 | /** | 237 | /** |
238 | * Task to resume MHD handling when receiving is allowed again | 238 | * Task to resume MHD handling when receiving is allowed again |
239 | */ | 239 | */ |
240 | GNUNET_SCHEDULER_TaskIdentifier recv_wakeup_task; | 240 | struct GNUNET_SCHEDULER_Task * recv_wakeup_task; |
241 | 241 | ||
242 | /** | 242 | /** |
243 | * Number of bytes waiting for transmission to this peer. | 243 | * Number of bytes waiting for transmission to this peer. |
@@ -374,17 +374,17 @@ struct HTTP_Server_Plugin | |||
374 | /** | 374 | /** |
375 | * MHD IPv4 task | 375 | * MHD IPv4 task |
376 | */ | 376 | */ |
377 | GNUNET_SCHEDULER_TaskIdentifier server_v4_task; | 377 | struct GNUNET_SCHEDULER_Task * server_v4_task; |
378 | 378 | ||
379 | /** | 379 | /** |
380 | * MHD IPv6 task | 380 | * MHD IPv6 task |
381 | */ | 381 | */ |
382 | GNUNET_SCHEDULER_TaskIdentifier server_v6_task; | 382 | struct GNUNET_SCHEDULER_Task * server_v6_task; |
383 | 383 | ||
384 | /** | 384 | /** |
385 | * Task calling transport service about external address | 385 | * Task calling transport service about external address |
386 | */ | 386 | */ |
387 | GNUNET_SCHEDULER_TaskIdentifier notify_ext_task; | 387 | struct GNUNET_SCHEDULER_Task * notify_ext_task; |
388 | 388 | ||
389 | /** | 389 | /** |
390 | * Notify transport only about external address | 390 | * Notify transport only about external address |
@@ -499,7 +499,7 @@ server_wake_up (void *cls, | |||
499 | { | 499 | { |
500 | struct Session *s = cls; | 500 | struct Session *s = cls; |
501 | 501 | ||
502 | s->recv_wakeup_task = GNUNET_SCHEDULER_NO_TASK; | 502 | s->recv_wakeup_task = NULL; |
503 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 503 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
504 | return; | 504 | return; |
505 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 505 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
@@ -534,16 +534,16 @@ server_delete_session (struct Session *s) | |||
534 | struct HTTP_Server_Plugin *plugin = s->plugin; | 534 | struct HTTP_Server_Plugin *plugin = s->plugin; |
535 | struct HTTP_Message *msg; | 535 | struct HTTP_Message *msg; |
536 | 536 | ||
537 | if (GNUNET_SCHEDULER_NO_TASK != s->timeout_task) | 537 | if (NULL != s->timeout_task) |
538 | { | 538 | { |
539 | GNUNET_SCHEDULER_cancel (s->timeout_task); | 539 | GNUNET_SCHEDULER_cancel (s->timeout_task); |
540 | s->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 540 | s->timeout_task = NULL; |
541 | s->timeout = GNUNET_TIME_UNIT_ZERO_ABS; | 541 | s->timeout = GNUNET_TIME_UNIT_ZERO_ABS; |
542 | } | 542 | } |
543 | if (GNUNET_SCHEDULER_NO_TASK != s->recv_wakeup_task) | 543 | if (NULL != s->recv_wakeup_task) |
544 | { | 544 | { |
545 | GNUNET_SCHEDULER_cancel (s->recv_wakeup_task); | 545 | GNUNET_SCHEDULER_cancel (s->recv_wakeup_task); |
546 | s->recv_wakeup_task = GNUNET_SCHEDULER_NO_TASK; | 546 | s->recv_wakeup_task = NULL; |
547 | if (NULL != s->server_recv) | 547 | if (NULL != s->server_recv) |
548 | MHD_resume_connection (s->server_recv->mhd_conn); | 548 | MHD_resume_connection (s->server_recv->mhd_conn); |
549 | } | 549 | } |
@@ -649,7 +649,7 @@ server_session_timeout (void *cls, | |||
649 | struct Session *s = cls; | 649 | struct Session *s = cls; |
650 | struct GNUNET_TIME_Relative left; | 650 | struct GNUNET_TIME_Relative left; |
651 | 651 | ||
652 | s->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 652 | s->timeout_task = NULL; |
653 | left = GNUNET_TIME_absolute_get_remaining (s->timeout); | 653 | left = GNUNET_TIME_absolute_get_remaining (s->timeout); |
654 | if (0 != left.rel_value_us) | 654 | if (0 != left.rel_value_us) |
655 | { | 655 | { |
@@ -680,7 +680,7 @@ server_session_timeout (void *cls, | |||
680 | static void | 680 | static void |
681 | server_reschedule_session_timeout (struct Session *s) | 681 | server_reschedule_session_timeout (struct Session *s) |
682 | { | 682 | { |
683 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != s->timeout_task); | 683 | GNUNET_assert (NULL != s->timeout_task); |
684 | s->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); | 684 | s->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); |
685 | } | 685 | } |
686 | 686 | ||
@@ -917,7 +917,7 @@ server_v4_run (void *cls, | |||
917 | { | 917 | { |
918 | struct HTTP_Server_Plugin *plugin = cls; | 918 | struct HTTP_Server_Plugin *plugin = cls; |
919 | 919 | ||
920 | plugin->server_v4_task = GNUNET_SCHEDULER_NO_TASK; | 920 | plugin->server_v4_task = NULL; |
921 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 921 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
922 | return; | 922 | return; |
923 | plugin->server_v4_immediately = GNUNET_NO; | 923 | plugin->server_v4_immediately = GNUNET_NO; |
@@ -939,7 +939,7 @@ server_v6_run (void *cls, | |||
939 | { | 939 | { |
940 | struct HTTP_Server_Plugin *plugin = cls; | 940 | struct HTTP_Server_Plugin *plugin = cls; |
941 | 941 | ||
942 | plugin->server_v6_task = GNUNET_SCHEDULER_NO_TASK; | 942 | plugin->server_v6_task = NULL; |
943 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 943 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
944 | return; | 944 | return; |
945 | plugin->server_v6_immediately = GNUNET_NO; | 945 | plugin->server_v6_immediately = GNUNET_NO; |
@@ -957,12 +957,12 @@ server_v6_run (void *cls, | |||
957 | * @param now schedule now | 957 | * @param now schedule now |
958 | * @return gnunet task identifier | 958 | * @return gnunet task identifier |
959 | */ | 959 | */ |
960 | static GNUNET_SCHEDULER_TaskIdentifier | 960 | static struct GNUNET_SCHEDULER_Task * |
961 | server_schedule (struct HTTP_Server_Plugin *plugin, | 961 | server_schedule (struct HTTP_Server_Plugin *plugin, |
962 | struct MHD_Daemon *daemon_handle, | 962 | struct MHD_Daemon *daemon_handle, |
963 | int now) | 963 | int now) |
964 | { | 964 | { |
965 | GNUNET_SCHEDULER_TaskIdentifier ret; | 965 | struct GNUNET_SCHEDULER_Task * ret; |
966 | fd_set rs; | 966 | fd_set rs; |
967 | fd_set ws; | 967 | fd_set ws; |
968 | fd_set es; | 968 | fd_set es; |
@@ -975,9 +975,9 @@ server_schedule (struct HTTP_Server_Plugin *plugin, | |||
975 | struct GNUNET_TIME_Relative tv; | 975 | struct GNUNET_TIME_Relative tv; |
976 | 976 | ||
977 | if (GNUNET_YES == plugin->in_shutdown) | 977 | if (GNUNET_YES == plugin->in_shutdown) |
978 | return GNUNET_SCHEDULER_NO_TASK; | 978 | return NULL; |
979 | 979 | ||
980 | ret = GNUNET_SCHEDULER_NO_TASK; | 980 | ret = NULL; |
981 | FD_ZERO (&rs); | 981 | FD_ZERO (&rs); |
982 | FD_ZERO (&ws); | 982 | FD_ZERO (&ws); |
983 | FD_ZERO (&es); | 983 | FD_ZERO (&es); |
@@ -1015,10 +1015,10 @@ server_schedule (struct HTTP_Server_Plugin *plugin, | |||
1015 | 1015 | ||
1016 | if (daemon_handle == plugin->server_v4) | 1016 | if (daemon_handle == plugin->server_v4) |
1017 | { | 1017 | { |
1018 | if (plugin->server_v4_task != GNUNET_SCHEDULER_NO_TASK) | 1018 | if (plugin->server_v4_task != NULL) |
1019 | { | 1019 | { |
1020 | GNUNET_SCHEDULER_cancel (plugin->server_v4_task); | 1020 | GNUNET_SCHEDULER_cancel (plugin->server_v4_task); |
1021 | plugin->server_v4_task = GNUNET_SCHEDULER_NO_TASK; | 1021 | plugin->server_v4_task = NULL; |
1022 | } | 1022 | } |
1023 | #if 0 | 1023 | #if 0 |
1024 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1024 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1032,10 +1032,10 @@ server_schedule (struct HTTP_Server_Plugin *plugin, | |||
1032 | } | 1032 | } |
1033 | if (daemon_handle == plugin->server_v6) | 1033 | if (daemon_handle == plugin->server_v6) |
1034 | { | 1034 | { |
1035 | if (plugin->server_v6_task != GNUNET_SCHEDULER_NO_TASK) | 1035 | if (plugin->server_v6_task != NULL) |
1036 | { | 1036 | { |
1037 | GNUNET_SCHEDULER_cancel (plugin->server_v6_task); | 1037 | GNUNET_SCHEDULER_cancel (plugin->server_v6_task); |
1038 | plugin->server_v6_task = GNUNET_SCHEDULER_NO_TASK; | 1038 | plugin->server_v6_task = NULL; |
1039 | } | 1039 | } |
1040 | #if 0 | 1040 | #if 0 |
1041 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1041 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1073,10 +1073,10 @@ server_reschedule (struct HTTP_Server_Plugin *plugin, | |||
1073 | if (GNUNET_YES == now) | 1073 | if (GNUNET_YES == now) |
1074 | plugin->server_v4_immediately = GNUNET_YES; | 1074 | plugin->server_v4_immediately = GNUNET_YES; |
1075 | 1075 | ||
1076 | if (plugin->server_v4_task != GNUNET_SCHEDULER_NO_TASK) | 1076 | if (plugin->server_v4_task != NULL) |
1077 | { | 1077 | { |
1078 | GNUNET_SCHEDULER_cancel (plugin->server_v4_task); | 1078 | GNUNET_SCHEDULER_cancel (plugin->server_v4_task); |
1079 | plugin->server_v4_task = GNUNET_SCHEDULER_NO_TASK; | 1079 | plugin->server_v4_task = NULL; |
1080 | } | 1080 | } |
1081 | plugin->server_v4_task = server_schedule (plugin, plugin->server_v4, now); | 1081 | plugin->server_v4_task = server_schedule (plugin, plugin->server_v4, now); |
1082 | } | 1082 | } |
@@ -1089,10 +1089,10 @@ server_reschedule (struct HTTP_Server_Plugin *plugin, | |||
1089 | if (GNUNET_YES == now) | 1089 | if (GNUNET_YES == now) |
1090 | plugin->server_v6_immediately = GNUNET_YES; | 1090 | plugin->server_v6_immediately = GNUNET_YES; |
1091 | 1091 | ||
1092 | if (plugin->server_v6_task != GNUNET_SCHEDULER_NO_TASK) | 1092 | if (plugin->server_v6_task != NULL) |
1093 | { | 1093 | { |
1094 | GNUNET_SCHEDULER_cancel (plugin->server_v6_task); | 1094 | GNUNET_SCHEDULER_cancel (plugin->server_v6_task); |
1095 | plugin->server_v6_task = GNUNET_SCHEDULER_NO_TASK; | 1095 | plugin->server_v6_task = NULL; |
1096 | } | 1096 | } |
1097 | plugin->server_v6_task = server_schedule (plugin, plugin->server_v6, now); | 1097 | plugin->server_v6_task = server_schedule (plugin, plugin->server_v6, now); |
1098 | } | 1098 | } |
@@ -1895,7 +1895,7 @@ server_access_cb (void *cls, | |||
1895 | s, sc, GNUNET_STRINGS_relative_time_to_string (delay, GNUNET_YES)); | 1895 | s, sc, GNUNET_STRINGS_relative_time_to_string (delay, GNUNET_YES)); |
1896 | GNUNET_assert(s->server_recv->mhd_conn == mhd_connection); | 1896 | GNUNET_assert(s->server_recv->mhd_conn == mhd_connection); |
1897 | MHD_suspend_connection (s->server_recv->mhd_conn); | 1897 | MHD_suspend_connection (s->server_recv->mhd_conn); |
1898 | if (GNUNET_SCHEDULER_NO_TASK == s->recv_wakeup_task) | 1898 | if (NULL == s->recv_wakeup_task) |
1899 | s->recv_wakeup_task = GNUNET_SCHEDULER_add_delayed (delay, | 1899 | s->recv_wakeup_task = GNUNET_SCHEDULER_add_delayed (delay, |
1900 | &server_wake_up, s); | 1900 | &server_wake_up, s); |
1901 | } | 1901 | } |
@@ -2881,7 +2881,7 @@ server_notify_external_hostname (void *cls, | |||
2881 | unsigned int urlen; | 2881 | unsigned int urlen; |
2882 | char *url; | 2882 | char *url; |
2883 | 2883 | ||
2884 | plugin->notify_ext_task = GNUNET_SCHEDULER_NO_TASK; | 2884 | plugin->notify_ext_task = NULL; |
2885 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 2885 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
2886 | return; | 2886 | return; |
2887 | 2887 | ||
@@ -3175,10 +3175,10 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) | |||
3175 | _("Shutting down plugin `%s'\n"), | 3175 | _("Shutting down plugin `%s'\n"), |
3176 | plugin->name); | 3176 | plugin->name); |
3177 | 3177 | ||
3178 | if (GNUNET_SCHEDULER_NO_TASK != plugin->notify_ext_task) | 3178 | if (NULL != plugin->notify_ext_task) |
3179 | { | 3179 | { |
3180 | GNUNET_SCHEDULER_cancel (plugin->notify_ext_task); | 3180 | GNUNET_SCHEDULER_cancel (plugin->notify_ext_task); |
3181 | plugin->notify_ext_task = GNUNET_SCHEDULER_NO_TASK; | 3181 | plugin->notify_ext_task = NULL; |
3182 | } | 3182 | } |
3183 | 3183 | ||
3184 | if (NULL != plugin->ext_addr) | 3184 | if (NULL != plugin->ext_addr) |
@@ -3213,16 +3213,16 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) | |||
3213 | MHD_stop_daemon (plugin->server_v6); | 3213 | MHD_stop_daemon (plugin->server_v6); |
3214 | plugin->server_v6 = NULL; | 3214 | plugin->server_v6 = NULL; |
3215 | } | 3215 | } |
3216 | if (GNUNET_SCHEDULER_NO_TASK != plugin->server_v4_task) | 3216 | if (NULL != plugin->server_v4_task) |
3217 | { | 3217 | { |
3218 | GNUNET_SCHEDULER_cancel (plugin->server_v4_task); | 3218 | GNUNET_SCHEDULER_cancel (plugin->server_v4_task); |
3219 | plugin->server_v4_task = GNUNET_SCHEDULER_NO_TASK; | 3219 | plugin->server_v4_task = NULL; |
3220 | } | 3220 | } |
3221 | 3221 | ||
3222 | if (GNUNET_SCHEDULER_NO_TASK != plugin->server_v6_task) | 3222 | if (NULL != plugin->server_v6_task) |
3223 | { | 3223 | { |
3224 | GNUNET_SCHEDULER_cancel (plugin->server_v6_task); | 3224 | GNUNET_SCHEDULER_cancel (plugin->server_v6_task); |
3225 | plugin->server_v6_task = GNUNET_SCHEDULER_NO_TASK; | 3225 | plugin->server_v6_task = NULL; |
3226 | } | 3226 | } |
3227 | #if BUILD_HTTPS | 3227 | #if BUILD_HTTPS |
3228 | GNUNET_free_non_null (plugin->crypto_init); | 3228 | GNUNET_free_non_null (plugin->crypto_init); |
@@ -3309,7 +3309,7 @@ http_server_plugin_update_inbound_delay (void *cls, | |||
3309 | "New inbound delay %s\n", | 3309 | "New inbound delay %s\n", |
3310 | GNUNET_STRINGS_relative_time_to_string (delay, | 3310 | GNUNET_STRINGS_relative_time_to_string (delay, |
3311 | GNUNET_NO)); | 3311 | GNUNET_NO)); |
3312 | if (GNUNET_SCHEDULER_NO_TASK != session->recv_wakeup_task) | 3312 | if (NULL != session->recv_wakeup_task) |
3313 | { | 3313 | { |
3314 | GNUNET_SCHEDULER_cancel (session->recv_wakeup_task); | 3314 | GNUNET_SCHEDULER_cancel (session->recv_wakeup_task); |
3315 | session->recv_wakeup_task | 3315 | session->recv_wakeup_task |
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 021a647ad..4f7b57641 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -269,7 +269,7 @@ struct Session | |||
269 | /** | 269 | /** |
270 | * Task cleaning up a NAT client connection establishment attempt; | 270 | * Task cleaning up a NAT client connection establishment attempt; |
271 | */ | 271 | */ |
272 | GNUNET_SCHEDULER_TaskIdentifier nat_connection_timeout; | 272 | struct GNUNET_SCHEDULER_Task * nat_connection_timeout; |
273 | 273 | ||
274 | /** | 274 | /** |
275 | * Messages currently pending for transmission | 275 | * Messages currently pending for transmission |
@@ -296,12 +296,12 @@ struct Session | |||
296 | /** | 296 | /** |
297 | * ID of task used to delay receiving more to throttle sender. | 297 | * ID of task used to delay receiving more to throttle sender. |
298 | */ | 298 | */ |
299 | GNUNET_SCHEDULER_TaskIdentifier receive_delay_task; | 299 | struct GNUNET_SCHEDULER_Task * receive_delay_task; |
300 | 300 | ||
301 | /** | 301 | /** |
302 | * Session timeout task | 302 | * Session timeout task |
303 | */ | 303 | */ |
304 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 304 | struct GNUNET_SCHEDULER_Task * timeout_task; |
305 | 305 | ||
306 | /** | 306 | /** |
307 | * When will this session time out? | 307 | * When will this session time out? |
@@ -435,7 +435,7 @@ struct Plugin | |||
435 | /** | 435 | /** |
436 | * ID of task used to update our addresses when one expires. | 436 | * ID of task used to update our addresses when one expires. |
437 | */ | 437 | */ |
438 | GNUNET_SCHEDULER_TaskIdentifier address_update_task; | 438 | struct GNUNET_SCHEDULER_Task * address_update_task; |
439 | 439 | ||
440 | /** | 440 | /** |
441 | * Address options | 441 | * Address options |
@@ -480,7 +480,7 @@ notify_session_monitor (struct Plugin *plugin, | |||
480 | : GNUNET_NO; | 480 | : GNUNET_NO; |
481 | info.num_msg_pending = session->msgs_in_queue; | 481 | info.num_msg_pending = session->msgs_in_queue; |
482 | info.num_bytes_pending = session->bytes_in_queue; | 482 | info.num_bytes_pending = session->bytes_in_queue; |
483 | if (GNUNET_SCHEDULER_NO_TASK != session->receive_delay_task) | 483 | if (NULL != session->receive_delay_task) |
484 | info.receive_delay = session->receive_delay; | 484 | info.receive_delay = session->receive_delay; |
485 | info.session_timeout = session->timeout; | 485 | info.session_timeout = session->timeout; |
486 | info.address = session->address; | 486 | info.address = session->address; |
@@ -813,10 +813,10 @@ tcp_plugin_disconnect_session (void *cls, | |||
813 | session->address->address, | 813 | session->address->address, |
814 | session->address->address_length)); | 814 | session->address->address_length)); |
815 | 815 | ||
816 | if (GNUNET_SCHEDULER_NO_TASK != session->timeout_task) | 816 | if (NULL != session->timeout_task) |
817 | { | 817 | { |
818 | GNUNET_SCHEDULER_cancel (session->timeout_task); | 818 | GNUNET_SCHEDULER_cancel (session->timeout_task); |
819 | session->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 819 | session->timeout_task = NULL; |
820 | session->timeout = GNUNET_TIME_UNIT_ZERO_ABS; | 820 | session->timeout = GNUNET_TIME_UNIT_ZERO_ABS; |
821 | } | 821 | } |
822 | 822 | ||
@@ -853,10 +853,10 @@ tcp_plugin_disconnect_session (void *cls, | |||
853 | session->address, | 853 | session->address, |
854 | session); | 854 | session); |
855 | 855 | ||
856 | if (GNUNET_SCHEDULER_NO_TASK != session->nat_connection_timeout) | 856 | if (NULL != session->nat_connection_timeout) |
857 | { | 857 | { |
858 | GNUNET_SCHEDULER_cancel (session->nat_connection_timeout); | 858 | GNUNET_SCHEDULER_cancel (session->nat_connection_timeout); |
859 | session->nat_connection_timeout = GNUNET_SCHEDULER_NO_TASK; | 859 | session->nat_connection_timeout = NULL; |
860 | } | 860 | } |
861 | 861 | ||
862 | while (NULL != (pm = session->pending_messages_head)) | 862 | while (NULL != (pm = session->pending_messages_head)) |
@@ -894,7 +894,7 @@ tcp_plugin_disconnect_session (void *cls, | |||
894 | session, | 894 | session, |
895 | GNUNET_TRANSPORT_SS_DONE); | 895 | GNUNET_TRANSPORT_SS_DONE); |
896 | 896 | ||
897 | if (session->receive_delay_task != GNUNET_SCHEDULER_NO_TASK) | 897 | if (session->receive_delay_task != NULL) |
898 | { | 898 | { |
899 | GNUNET_SCHEDULER_cancel (session->receive_delay_task); | 899 | GNUNET_SCHEDULER_cancel (session->receive_delay_task); |
900 | if (NULL != session->client) | 900 | if (NULL != session->client) |
@@ -941,7 +941,7 @@ session_timeout (void *cls, | |||
941 | struct Session *s = cls; | 941 | struct Session *s = cls; |
942 | struct GNUNET_TIME_Relative left; | 942 | struct GNUNET_TIME_Relative left; |
943 | 943 | ||
944 | s->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 944 | s->timeout_task = NULL; |
945 | left = GNUNET_TIME_absolute_get_remaining (s->timeout); | 945 | left = GNUNET_TIME_absolute_get_remaining (s->timeout); |
946 | if (0 != left.rel_value_us) | 946 | if (0 != left.rel_value_us) |
947 | { | 947 | { |
@@ -973,7 +973,7 @@ session_timeout (void *cls, | |||
973 | static void | 973 | static void |
974 | reschedule_session_timeout (struct Session *s) | 974 | reschedule_session_timeout (struct Session *s) |
975 | { | 975 | { |
976 | GNUNET_assert(GNUNET_SCHEDULER_NO_TASK != s->timeout_task); | 976 | GNUNET_assert(NULL != s->timeout_task); |
977 | s->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); | 977 | s->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); |
978 | } | 978 | } |
979 | 979 | ||
@@ -1417,7 +1417,7 @@ nat_connect_timeout (void *cls, | |||
1417 | { | 1417 | { |
1418 | struct Session *session = cls; | 1418 | struct Session *session = cls; |
1419 | 1419 | ||
1420 | session->nat_connection_timeout = GNUNET_SCHEDULER_NO_TASK; | 1420 | session->nat_connection_timeout = NULL; |
1421 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1421 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1422 | "NAT WAIT connection to `%4s' at `%s' could not be established, removing session\n", | 1422 | "NAT WAIT connection to `%4s' at `%s' could not be established, removing session\n", |
1423 | GNUNET_i2s (&session->target), | 1423 | GNUNET_i2s (&session->target), |
@@ -1460,7 +1460,7 @@ delayed_done (void *cls, | |||
1460 | { | 1460 | { |
1461 | struct Session *session = cls; | 1461 | struct Session *session = cls; |
1462 | 1462 | ||
1463 | session->receive_delay_task = GNUNET_SCHEDULER_NO_TASK; | 1463 | session->receive_delay_task = NULL; |
1464 | reschedule_session_timeout (session); | 1464 | reschedule_session_timeout (session); |
1465 | 1465 | ||
1466 | GNUNET_SERVER_receive_done (session->client, GNUNET_OK); | 1466 | GNUNET_SERVER_receive_done (session->client, GNUNET_OK); |
@@ -1483,7 +1483,7 @@ tcp_plugin_update_inbound_delay (void *cls, | |||
1483 | struct Session *session, | 1483 | struct Session *session, |
1484 | struct GNUNET_TIME_Relative delay) | 1484 | struct GNUNET_TIME_Relative delay) |
1485 | { | 1485 | { |
1486 | if (GNUNET_SCHEDULER_NO_TASK == session->receive_delay_task) | 1486 | if (NULL == session->receive_delay_task) |
1487 | return; | 1487 | return; |
1488 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1488 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1489 | "New inbound delay %s\n", | 1489 | "New inbound delay %s\n", |
@@ -1846,7 +1846,7 @@ struct PrettyPrinterContext | |||
1846 | /** | 1846 | /** |
1847 | * Timeout task | 1847 | * Timeout task |
1848 | */ | 1848 | */ |
1849 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 1849 | struct GNUNET_SCHEDULER_Task * timeout_task; |
1850 | 1850 | ||
1851 | /** | 1851 | /** |
1852 | * Resolver handle | 1852 | * Resolver handle |
@@ -2166,10 +2166,10 @@ handle_tcp_nat_probe (void *cls, | |||
2166 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 2166 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
2167 | "Found session for NAT probe!\n"); | 2167 | "Found session for NAT probe!\n"); |
2168 | 2168 | ||
2169 | if (session->nat_connection_timeout != GNUNET_SCHEDULER_NO_TASK) | 2169 | if (session->nat_connection_timeout != NULL) |
2170 | { | 2170 | { |
2171 | GNUNET_SCHEDULER_cancel (session->nat_connection_timeout); | 2171 | GNUNET_SCHEDULER_cancel (session->nat_connection_timeout); |
2172 | session->nat_connection_timeout = GNUNET_SCHEDULER_NO_TASK; | 2172 | session->nat_connection_timeout = NULL; |
2173 | } | 2173 | } |
2174 | 2174 | ||
2175 | if (GNUNET_OK != GNUNET_SERVER_client_get_address (client, &vaddr, &alen)) | 2175 | if (GNUNET_OK != GNUNET_SERVER_client_get_address (client, &vaddr, &alen)) |
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 */ |
diff --git a/src/transport/plugin_transport_udp.h b/src/transport/plugin_transport_udp.h index 3770b3b70..2e77b9010 100644 --- a/src/transport/plugin_transport_udp.h +++ b/src/transport/plugin_transport_udp.h | |||
@@ -155,12 +155,12 @@ struct Plugin | |||
155 | /** | 155 | /** |
156 | * ID of select task for IPv4 | 156 | * ID of select task for IPv4 |
157 | */ | 157 | */ |
158 | GNUNET_SCHEDULER_TaskIdentifier select_task; | 158 | struct GNUNET_SCHEDULER_Task * select_task; |
159 | 159 | ||
160 | /** | 160 | /** |
161 | * ID of select task for IPv6 | 161 | * ID of select task for IPv6 |
162 | */ | 162 | */ |
163 | GNUNET_SCHEDULER_TaskIdentifier select_task_v6; | 163 | struct GNUNET_SCHEDULER_Task * select_task_v6; |
164 | 164 | ||
165 | /** | 165 | /** |
166 | * Tokenizer for inbound messages. | 166 | * Tokenizer for inbound messages. |
diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c index 9ed1bff65..6566245cd 100644 --- a/src/transport/plugin_transport_udp_broadcasting.c +++ b/src/transport/plugin_transport_udp_broadcasting.c | |||
@@ -84,7 +84,7 @@ struct BroadcastAddress | |||
84 | /** | 84 | /** |
85 | * ID of select broadcast task | 85 | * ID of select broadcast task |
86 | */ | 86 | */ |
87 | GNUNET_SCHEDULER_TaskIdentifier broadcast_task; | 87 | struct GNUNET_SCHEDULER_Task * broadcast_task; |
88 | 88 | ||
89 | struct Plugin *plugin; | 89 | struct Plugin *plugin; |
90 | 90 | ||
@@ -302,7 +302,7 @@ udp_ipv4_broadcast_send (void *cls, | |||
302 | uint16_t msg_size; | 302 | uint16_t msg_size; |
303 | char buf[65536] GNUNET_ALIGN; | 303 | char buf[65536] GNUNET_ALIGN; |
304 | 304 | ||
305 | baddr->broadcast_task = GNUNET_SCHEDULER_NO_TASK; | 305 | baddr->broadcast_task = NULL; |
306 | 306 | ||
307 | msg_size = prepare_beacon(plugin, (struct UDP_Beacon_Message *) &buf); | 307 | msg_size = prepare_beacon(plugin, (struct UDP_Beacon_Message *) &buf); |
308 | if (0 != msg_size) | 308 | if (0 != msg_size) |
@@ -379,7 +379,7 @@ udp_ipv6_broadcast_send (void *cls, | |||
379 | char buf[65536] GNUNET_ALIGN; | 379 | char buf[65536] GNUNET_ALIGN; |
380 | const struct sockaddr_in6 *s6 = (const struct sockaddr_in6 *) baddr->addr; | 380 | const struct sockaddr_in6 *s6 = (const struct sockaddr_in6 *) baddr->addr; |
381 | 381 | ||
382 | baddr->broadcast_task = GNUNET_SCHEDULER_NO_TASK; | 382 | baddr->broadcast_task = NULL; |
383 | 383 | ||
384 | msg_size = prepare_beacon(plugin, (struct UDP_Beacon_Message *) &buf); | 384 | msg_size = prepare_beacon(plugin, (struct UDP_Beacon_Message *) &buf); |
385 | /* Note: unclear if this actually works to limit the multicast to | 385 | /* Note: unclear if this actually works to limit the multicast to |
@@ -651,10 +651,10 @@ stop_broadcast (struct Plugin *plugin) | |||
651 | { | 651 | { |
652 | struct BroadcastAddress *p = plugin->broadcast_head; | 652 | struct BroadcastAddress *p = plugin->broadcast_head; |
653 | 653 | ||
654 | if (p->broadcast_task != GNUNET_SCHEDULER_NO_TASK) | 654 | if (p->broadcast_task != NULL) |
655 | { | 655 | { |
656 | GNUNET_SCHEDULER_cancel (p->broadcast_task); | 656 | GNUNET_SCHEDULER_cancel (p->broadcast_task); |
657 | p->broadcast_task = GNUNET_SCHEDULER_NO_TASK; | 657 | p->broadcast_task = NULL; |
658 | } | 658 | } |
659 | if ((GNUNET_YES == plugin->enable_ipv6) && | 659 | if ((GNUNET_YES == plugin->enable_ipv6) && |
660 | (NULL != plugin->sockv6) && | 660 | (NULL != plugin->sockv6) && |
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index 7e2601aed..460869181 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c | |||
@@ -218,7 +218,7 @@ struct Session | |||
218 | /** | 218 | /** |
219 | * Session timeout task. | 219 | * Session timeout task. |
220 | */ | 220 | */ |
221 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 221 | struct GNUNET_SCHEDULER_Task * timeout_task; |
222 | 222 | ||
223 | /** | 223 | /** |
224 | * Number of messages we currently have in our write queue. | 224 | * Number of messages we currently have in our write queue. |
@@ -255,17 +255,17 @@ struct Plugin | |||
255 | /** | 255 | /** |
256 | * ID of task used to update our addresses when one expires. | 256 | * ID of task used to update our addresses when one expires. |
257 | */ | 257 | */ |
258 | GNUNET_SCHEDULER_TaskIdentifier address_update_task; | 258 | struct GNUNET_SCHEDULER_Task * address_update_task; |
259 | 259 | ||
260 | /** | 260 | /** |
261 | * ID of read task | 261 | * ID of read task |
262 | */ | 262 | */ |
263 | GNUNET_SCHEDULER_TaskIdentifier read_task; | 263 | struct GNUNET_SCHEDULER_Task * read_task; |
264 | 264 | ||
265 | /** | 265 | /** |
266 | * ID of write task | 266 | * ID of write task |
267 | */ | 267 | */ |
268 | GNUNET_SCHEDULER_TaskIdentifier write_task; | 268 | struct GNUNET_SCHEDULER_Task * write_task; |
269 | 269 | ||
270 | /** | 270 | /** |
271 | * Number of bytes we currently have in our write queues. | 271 | * Number of bytes we currently have in our write queues. |
@@ -482,10 +482,10 @@ unix_plugin_session_disconnect (void *cls, | |||
482 | "# UNIX sessions active", | 482 | "# UNIX sessions active", |
483 | GNUNET_CONTAINER_multipeermap_size (plugin->session_map), | 483 | GNUNET_CONTAINER_multipeermap_size (plugin->session_map), |
484 | GNUNET_NO); | 484 | GNUNET_NO); |
485 | if (GNUNET_SCHEDULER_NO_TASK != session->timeout_task) | 485 | if (NULL != session->timeout_task) |
486 | { | 486 | { |
487 | GNUNET_SCHEDULER_cancel (session->timeout_task); | 487 | GNUNET_SCHEDULER_cancel (session->timeout_task); |
488 | session->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 488 | session->timeout_task = NULL; |
489 | session->timeout = GNUNET_TIME_UNIT_ZERO_ABS; | 489 | session->timeout = GNUNET_TIME_UNIT_ZERO_ABS; |
490 | } | 490 | } |
491 | notify_session_monitor (plugin, | 491 | notify_session_monitor (plugin, |
@@ -512,7 +512,7 @@ session_timeout (void *cls, | |||
512 | struct Session *session = cls; | 512 | struct Session *session = cls; |
513 | struct GNUNET_TIME_Relative left; | 513 | struct GNUNET_TIME_Relative left; |
514 | 514 | ||
515 | session->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 515 | session->timeout_task = NULL; |
516 | left = GNUNET_TIME_absolute_get_remaining (session->timeout); | 516 | left = GNUNET_TIME_absolute_get_remaining (session->timeout); |
517 | if (0 != left.rel_value_us) | 517 | if (0 != left.rel_value_us) |
518 | { | 518 | { |
@@ -545,7 +545,7 @@ session_timeout (void *cls, | |||
545 | static void | 545 | static void |
546 | reschedule_session_timeout (struct Session *session) | 546 | reschedule_session_timeout (struct Session *session) |
547 | { | 547 | { |
548 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != session->timeout_task); | 548 | GNUNET_assert (NULL != session->timeout_task); |
549 | session->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); | 549 | session->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); |
550 | } | 550 | } |
551 | 551 | ||
@@ -1226,7 +1226,7 @@ unix_plugin_select_read (void *cls, | |||
1226 | { | 1226 | { |
1227 | struct Plugin *plugin = cls; | 1227 | struct Plugin *plugin = cls; |
1228 | 1228 | ||
1229 | plugin->read_task = GNUNET_SCHEDULER_NO_TASK; | 1229 | plugin->read_task = NULL; |
1230 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1230 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1231 | return; | 1231 | return; |
1232 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) | 1232 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) |
@@ -1251,7 +1251,7 @@ unix_plugin_select_write (void *cls, | |||
1251 | { | 1251 | { |
1252 | struct Plugin *plugin = cls; | 1252 | struct Plugin *plugin = cls; |
1253 | 1253 | ||
1254 | plugin->write_task = GNUNET_SCHEDULER_NO_TASK; | 1254 | plugin->write_task = NULL; |
1255 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1255 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1256 | return; | 1256 | return; |
1257 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_WRITE_READY)) | 1257 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_WRITE_READY)) |
@@ -1358,7 +1358,7 @@ unix_plugin_send (void *cls, | |||
1358 | notify_session_monitor (plugin, | 1358 | notify_session_monitor (plugin, |
1359 | session, | 1359 | session, |
1360 | GNUNET_TRANSPORT_SS_UPDATE); | 1360 | GNUNET_TRANSPORT_SS_UPDATE); |
1361 | if (GNUNET_SCHEDULER_NO_TASK == plugin->write_task) | 1361 | if (NULL == plugin->write_task) |
1362 | plugin->write_task = | 1362 | plugin->write_task = |
1363 | GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, | 1363 | GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, |
1364 | plugin->unix_sock.desc, | 1364 | plugin->unix_sock.desc, |
@@ -1629,7 +1629,7 @@ address_notification (void *cls, | |||
1629 | unix_path = (char *) &ua[1]; | 1629 | unix_path = (char *) &ua[1]; |
1630 | memcpy (unix_path, plugin->unix_socket_path, strlen (plugin->unix_socket_path) + 1); | 1630 | memcpy (unix_path, plugin->unix_socket_path, strlen (plugin->unix_socket_path) + 1); |
1631 | 1631 | ||
1632 | plugin->address_update_task = GNUNET_SCHEDULER_NO_TASK; | 1632 | plugin->address_update_task = NULL; |
1633 | address = GNUNET_HELLO_address_allocate (plugin->env->my_identity, | 1633 | address = GNUNET_HELLO_address_allocate (plugin->env->my_identity, |
1634 | PLUGIN_NAME, | 1634 | PLUGIN_NAME, |
1635 | ua, | 1635 | ua, |
@@ -1886,20 +1886,20 @@ libgnunet_plugin_transport_unix_done (void *cls) | |||
1886 | GNUNET_free (msgw); | 1886 | GNUNET_free (msgw); |
1887 | } | 1887 | } |
1888 | 1888 | ||
1889 | if (GNUNET_SCHEDULER_NO_TASK != plugin->read_task) | 1889 | if (NULL != plugin->read_task) |
1890 | { | 1890 | { |
1891 | GNUNET_SCHEDULER_cancel (plugin->read_task); | 1891 | GNUNET_SCHEDULER_cancel (plugin->read_task); |
1892 | plugin->read_task = GNUNET_SCHEDULER_NO_TASK; | 1892 | plugin->read_task = NULL; |
1893 | } | 1893 | } |
1894 | if (GNUNET_SCHEDULER_NO_TASK != plugin->write_task) | 1894 | if (NULL != plugin->write_task) |
1895 | { | 1895 | { |
1896 | GNUNET_SCHEDULER_cancel (plugin->write_task); | 1896 | GNUNET_SCHEDULER_cancel (plugin->write_task); |
1897 | plugin->write_task = GNUNET_SCHEDULER_NO_TASK; | 1897 | plugin->write_task = NULL; |
1898 | } | 1898 | } |
1899 | if (GNUNET_SCHEDULER_NO_TASK != plugin->address_update_task) | 1899 | if (NULL != plugin->address_update_task) |
1900 | { | 1900 | { |
1901 | GNUNET_SCHEDULER_cancel (plugin->address_update_task); | 1901 | GNUNET_SCHEDULER_cancel (plugin->address_update_task); |
1902 | plugin->address_update_task = GNUNET_SCHEDULER_NO_TASK; | 1902 | plugin->address_update_task = NULL; |
1903 | } | 1903 | } |
1904 | if (NULL != plugin->unix_sock.desc) | 1904 | if (NULL != plugin->unix_sock.desc) |
1905 | { | 1905 | { |
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index ab9fa4a74..b0be34346 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c | |||
@@ -204,7 +204,7 @@ struct PendingMessage | |||
204 | /** | 204 | /** |
205 | * Timeout task (for this message). | 205 | * Timeout task (for this message). |
206 | */ | 206 | */ |
207 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 207 | struct GNUNET_SCHEDULER_Task * timeout_task; |
208 | 208 | ||
209 | }; | 209 | }; |
210 | 210 | ||
@@ -250,7 +250,7 @@ struct Session | |||
250 | /** | 250 | /** |
251 | * Timeout task (for the session). | 251 | * Timeout task (for the session). |
252 | */ | 252 | */ |
253 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 253 | struct GNUNET_SCHEDULER_Task * timeout_task; |
254 | 254 | ||
255 | }; | 255 | }; |
256 | 256 | ||
@@ -300,7 +300,7 @@ struct FragmentMessage | |||
300 | /** | 300 | /** |
301 | * Timeout task. | 301 | * Timeout task. |
302 | */ | 302 | */ |
303 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 303 | struct GNUNET_SCHEDULER_Task * timeout_task; |
304 | 304 | ||
305 | /** | 305 | /** |
306 | * Continuation to call when we're done with this message. | 306 | * Continuation to call when we're done with this message. |
@@ -379,7 +379,7 @@ struct MacEndpoint | |||
379 | /** | 379 | /** |
380 | * Timeout task. | 380 | * Timeout task. |
381 | */ | 381 | */ |
382 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 382 | struct GNUNET_SCHEDULER_Task * timeout_task; |
383 | 383 | ||
384 | /** | 384 | /** |
385 | * count of messages in the fragment out queue for this mac endpoint | 385 | * count of messages in the fragment out queue for this mac endpoint |
@@ -484,7 +484,7 @@ struct Plugin | |||
484 | /** | 484 | /** |
485 | * Task that periodically sends a HELLO beacon via the helper. | 485 | * Task that periodically sends a HELLO beacon via the helper. |
486 | */ | 486 | */ |
487 | GNUNET_SCHEDULER_TaskIdentifier beacon_task; | 487 | struct GNUNET_SCHEDULER_Task * beacon_task; |
488 | 488 | ||
489 | /** | 489 | /** |
490 | * Tracker for bandwidth limit | 490 | * Tracker for bandwidth limit |
@@ -777,10 +777,10 @@ wlan_plugin_disconnect_session (void *cls, | |||
777 | GNUNET_CONTAINER_DLL_remove (endpoint->sessions_head, | 777 | GNUNET_CONTAINER_DLL_remove (endpoint->sessions_head, |
778 | endpoint->sessions_tail, | 778 | endpoint->sessions_tail, |
779 | session); | 779 | session); |
780 | if (session->timeout_task != GNUNET_SCHEDULER_NO_TASK) | 780 | if (session->timeout_task != NULL) |
781 | { | 781 | { |
782 | GNUNET_SCHEDULER_cancel (session->timeout_task); | 782 | GNUNET_SCHEDULER_cancel (session->timeout_task); |
783 | session->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 783 | session->timeout_task = NULL; |
784 | } | 784 | } |
785 | GNUNET_STATISTICS_update (plugin->env->stats, | 785 | GNUNET_STATISTICS_update (plugin->env->stats, |
786 | _("# Sessions allocated"), | 786 | _("# Sessions allocated"), |
@@ -820,7 +820,7 @@ session_timeout (void *cls, | |||
820 | struct Session *session = cls; | 820 | struct Session *session = cls; |
821 | struct GNUNET_TIME_Relative left; | 821 | struct GNUNET_TIME_Relative left; |
822 | 822 | ||
823 | session->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 823 | session->timeout_task = NULL; |
824 | left = GNUNET_TIME_absolute_get_remaining (session->timeout); | 824 | left = GNUNET_TIME_absolute_get_remaining (session->timeout); |
825 | if (0 != left.rel_value_us) | 825 | if (0 != left.rel_value_us) |
826 | { | 826 | { |
@@ -1025,10 +1025,10 @@ free_fragment_message (struct FragmentMessage *fm) | |||
1025 | GNUNET_FRAGMENT_context_destroy (fm->fragcontext, | 1025 | GNUNET_FRAGMENT_context_destroy (fm->fragcontext, |
1026 | &endpoint->msg_delay, | 1026 | &endpoint->msg_delay, |
1027 | &endpoint->ack_delay); | 1027 | &endpoint->ack_delay); |
1028 | if (fm->timeout_task != GNUNET_SCHEDULER_NO_TASK) | 1028 | if (fm->timeout_task != NULL) |
1029 | { | 1029 | { |
1030 | GNUNET_SCHEDULER_cancel (fm->timeout_task); | 1030 | GNUNET_SCHEDULER_cancel (fm->timeout_task); |
1031 | fm->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 1031 | fm->timeout_task = NULL; |
1032 | } | 1032 | } |
1033 | GNUNET_free (fm); | 1033 | GNUNET_free (fm); |
1034 | } | 1034 | } |
@@ -1046,7 +1046,7 @@ fragmentmessage_timeout (void *cls, | |||
1046 | { | 1046 | { |
1047 | struct FragmentMessage *fm = cls; | 1047 | struct FragmentMessage *fm = cls; |
1048 | 1048 | ||
1049 | fm->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 1049 | fm->timeout_task = NULL; |
1050 | if (NULL != fm->cont) | 1050 | if (NULL != fm->cont) |
1051 | { | 1051 | { |
1052 | fm->cont (fm->cont_cls, | 1052 | fm->cont (fm->cont_cls, |
@@ -1145,10 +1145,10 @@ free_macendpoint (struct MacEndpoint *endpoint) | |||
1145 | } | 1145 | } |
1146 | 1146 | ||
1147 | plugin->mac_count--; | 1147 | plugin->mac_count--; |
1148 | if (GNUNET_SCHEDULER_NO_TASK != endpoint->timeout_task) | 1148 | if (NULL != endpoint->timeout_task) |
1149 | { | 1149 | { |
1150 | GNUNET_SCHEDULER_cancel (endpoint->timeout_task); | 1150 | GNUNET_SCHEDULER_cancel (endpoint->timeout_task); |
1151 | endpoint->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 1151 | endpoint->timeout_task = NULL; |
1152 | } | 1152 | } |
1153 | GNUNET_free (endpoint); | 1153 | GNUNET_free (endpoint); |
1154 | } | 1154 | } |
@@ -1167,7 +1167,7 @@ macendpoint_timeout (void *cls, | |||
1167 | struct MacEndpoint *endpoint = cls; | 1167 | struct MacEndpoint *endpoint = cls; |
1168 | struct GNUNET_TIME_Relative timeout; | 1168 | struct GNUNET_TIME_Relative timeout; |
1169 | 1169 | ||
1170 | endpoint->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 1170 | endpoint->timeout_task = NULL; |
1171 | timeout = GNUNET_TIME_absolute_get_remaining (endpoint->timeout); | 1171 | timeout = GNUNET_TIME_absolute_get_remaining (endpoint->timeout); |
1172 | if (0 == timeout.rel_value_us) | 1172 | if (0 == timeout.rel_value_us) |
1173 | { | 1173 | { |
@@ -1923,10 +1923,10 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) | |||
1923 | GNUNET_HELLO_address_free (address); | 1923 | GNUNET_HELLO_address_free (address); |
1924 | } | 1924 | } |
1925 | 1925 | ||
1926 | if (GNUNET_SCHEDULER_NO_TASK != plugin->beacon_task) | 1926 | if (NULL != plugin->beacon_task) |
1927 | { | 1927 | { |
1928 | GNUNET_SCHEDULER_cancel (plugin->beacon_task); | 1928 | GNUNET_SCHEDULER_cancel (plugin->beacon_task); |
1929 | plugin->beacon_task = GNUNET_SCHEDULER_NO_TASK; | 1929 | plugin->beacon_task = NULL; |
1930 | } | 1930 | } |
1931 | if (NULL != plugin->suid_helper) | 1931 | if (NULL != plugin->suid_helper) |
1932 | { | 1932 | { |
@@ -2077,7 +2077,7 @@ wlan_plugin_update_session_timeout (void *cls, | |||
2077 | const struct GNUNET_PeerIdentity *peer, | 2077 | const struct GNUNET_PeerIdentity *peer, |
2078 | struct Session *session) | 2078 | struct Session *session) |
2079 | { | 2079 | { |
2080 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != session->timeout_task); | 2080 | GNUNET_assert (NULL != session->timeout_task); |
2081 | session->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); | 2081 | session->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); |
2082 | } | 2082 | } |
2083 | 2083 | ||
diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c index 83ff7f1c4..e9942cff9 100644 --- a/src/transport/test_plugin_transport.c +++ b/src/transport/test_plugin_transport.c | |||
@@ -89,12 +89,12 @@ struct GNUNET_HELPER_Handle *suid_helper; | |||
89 | /** | 89 | /** |
90 | * Timeout task | 90 | * Timeout task |
91 | */ | 91 | */ |
92 | static GNUNET_SCHEDULER_TaskIdentifier timeout_endbadly; | 92 | static struct GNUNET_SCHEDULER_Task * timeout_endbadly; |
93 | 93 | ||
94 | /** | 94 | /** |
95 | * Timeout task | 95 | * Timeout task |
96 | */ | 96 | */ |
97 | static GNUNET_SCHEDULER_TaskIdentifier timeout_wait; | 97 | static struct GNUNET_SCHEDULER_Task * timeout_wait; |
98 | 98 | ||
99 | /** | 99 | /** |
100 | * Library name | 100 | * Library name |
@@ -138,10 +138,10 @@ end () | |||
138 | int c = 0; | 138 | int c = 0; |
139 | ok = 0; | 139 | ok = 0; |
140 | 140 | ||
141 | if (GNUNET_SCHEDULER_NO_TASK != timeout_endbadly) | 141 | if (NULL != timeout_endbadly) |
142 | { | 142 | { |
143 | GNUNET_SCHEDULER_cancel (timeout_endbadly); | 143 | GNUNET_SCHEDULER_cancel (timeout_endbadly); |
144 | timeout_endbadly = GNUNET_SCHEDULER_NO_TASK; | 144 | timeout_endbadly = NULL; |
145 | } | 145 | } |
146 | if (NULL != api) | 146 | if (NULL != api) |
147 | GNUNET_PLUGIN_unload (libname, api); | 147 | GNUNET_PLUGIN_unload (libname, api); |
@@ -183,11 +183,11 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
183 | struct AddressWrapper *w; | 183 | struct AddressWrapper *w; |
184 | int c = 0; | 184 | int c = 0; |
185 | 185 | ||
186 | timeout_endbadly = GNUNET_SCHEDULER_NO_TASK; | 186 | timeout_endbadly = NULL; |
187 | if (GNUNET_SCHEDULER_NO_TASK != timeout_wait) | 187 | if (NULL != timeout_wait) |
188 | { | 188 | { |
189 | GNUNET_SCHEDULER_cancel (timeout_wait); | 189 | GNUNET_SCHEDULER_cancel (timeout_wait); |
190 | timeout_wait = GNUNET_SCHEDULER_NO_TASK; | 190 | timeout_wait = NULL; |
191 | } | 191 | } |
192 | 192 | ||
193 | if (pretty_printers_running > 0) | 193 | if (pretty_printers_running > 0) |
@@ -249,7 +249,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
249 | static void | 249 | static void |
250 | wait_end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 250 | wait_end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
251 | { | 251 | { |
252 | timeout_wait = GNUNET_SCHEDULER_NO_TASK; | 252 | timeout_wait = NULL; |
253 | if (0 == addresses_reported) | 253 | if (0 == addresses_reported) |
254 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, | 254 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, |
255 | "Plugin did not report any addresses, could not check address conversion functions\n"); | 255 | "Plugin did not report any addresses, could not check address conversion functions\n"); |
@@ -260,15 +260,15 @@ wait_end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
260 | static void | 260 | static void |
261 | end_badly_now () | 261 | end_badly_now () |
262 | { | 262 | { |
263 | if (GNUNET_SCHEDULER_NO_TASK != timeout_wait) | 263 | if (NULL != timeout_wait) |
264 | { | 264 | { |
265 | GNUNET_SCHEDULER_cancel (timeout_wait); | 265 | GNUNET_SCHEDULER_cancel (timeout_wait); |
266 | timeout_wait = GNUNET_SCHEDULER_NO_TASK; | 266 | timeout_wait = NULL; |
267 | } | 267 | } |
268 | if (GNUNET_SCHEDULER_NO_TASK != timeout_endbadly) | 268 | if (NULL != timeout_endbadly) |
269 | { | 269 | { |
270 | GNUNET_SCHEDULER_cancel (timeout_endbadly); | 270 | GNUNET_SCHEDULER_cancel (timeout_endbadly); |
271 | timeout_endbadly = GNUNET_SCHEDULER_NO_TASK; | 271 | timeout_endbadly = NULL; |
272 | } | 272 | } |
273 | timeout_endbadly = GNUNET_SCHEDULER_add_now (&end_badly, NULL ); | 273 | timeout_endbadly = GNUNET_SCHEDULER_add_now (&end_badly, NULL ); |
274 | } | 274 | } |
@@ -418,10 +418,10 @@ env_notify_address (void *cls, | |||
418 | end_badly_now (); | 418 | end_badly_now (); |
419 | return; | 419 | return; |
420 | } | 420 | } |
421 | if (GNUNET_SCHEDULER_NO_TASK != timeout_wait) | 421 | if (NULL != timeout_wait) |
422 | { | 422 | { |
423 | GNUNET_SCHEDULER_cancel (timeout_wait); | 423 | GNUNET_SCHEDULER_cancel (timeout_wait); |
424 | timeout_wait = GNUNET_SCHEDULER_NO_TASK; | 424 | timeout_wait = NULL; |
425 | } | 425 | } |
426 | 426 | ||
427 | timeout_wait = GNUNET_SCHEDULER_add_delayed (WAIT, &wait_end, NULL ); | 427 | timeout_wait = GNUNET_SCHEDULER_add_delayed (WAIT, &wait_end, NULL ); |
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c index ac43b8d05..250d3279f 100644 --- a/src/transport/test_quota_compliance.c +++ b/src/transport/test_quota_compliance.c | |||
@@ -47,9 +47,9 @@ static char *test_plugin; | |||
47 | 47 | ||
48 | static char *test_name; | 48 | static char *test_name; |
49 | 49 | ||
50 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 50 | static struct GNUNET_SCHEDULER_Task * die_task; |
51 | 51 | ||
52 | static GNUNET_SCHEDULER_TaskIdentifier measure_task; | 52 | static struct GNUNET_SCHEDULER_Task * measure_task; |
53 | 53 | ||
54 | struct PeerContext *p1; | 54 | struct PeerContext *p1; |
55 | 55 | ||
@@ -153,7 +153,7 @@ end () | |||
153 | datarate, quota_out_p1, quota_in_p2); | 153 | datarate, quota_out_p1, quota_in_p2); |
154 | } | 154 | } |
155 | 155 | ||
156 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 156 | if (die_task != NULL) |
157 | GNUNET_SCHEDULER_cancel (die_task); | 157 | GNUNET_SCHEDULER_cancel (die_task); |
158 | 158 | ||
159 | if (th != NULL) | 159 | if (th != NULL) |
@@ -171,10 +171,10 @@ end () | |||
171 | static void | 171 | static void |
172 | end_badly () | 172 | end_badly () |
173 | { | 173 | { |
174 | die_task = GNUNET_SCHEDULER_NO_TASK; | 174 | die_task = NULL; |
175 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 175 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); |
176 | 176 | ||
177 | if (measure_task != GNUNET_SCHEDULER_NO_TASK) | 177 | if (measure_task != NULL) |
178 | GNUNET_SCHEDULER_cancel (measure_task); | 178 | GNUNET_SCHEDULER_cancel (measure_task); |
179 | 179 | ||
180 | if (test_connected == GNUNET_YES) | 180 | if (test_connected == GNUNET_YES) |
@@ -244,7 +244,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
244 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 244 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
245 | "Timeout occurred while waiting for transmit_ready for message %u of %u\n", | 245 | "Timeout occurred while waiting for transmit_ready for message %u of %u\n", |
246 | msg_scheduled, TOTAL_MSGS); | 246 | msg_scheduled, TOTAL_MSGS); |
247 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 247 | if (NULL != die_task) |
248 | GNUNET_SCHEDULER_cancel (die_task); | 248 | GNUNET_SCHEDULER_cancel (die_task); |
249 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 249 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
250 | test_failed = 1; | 250 | test_failed = 1; |
@@ -348,7 +348,7 @@ measure (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
348 | { | 348 | { |
349 | static int counter; | 349 | static int counter; |
350 | 350 | ||
351 | measure_task = GNUNET_SCHEDULER_NO_TASK; | 351 | measure_task = NULL; |
352 | 352 | ||
353 | counter++; | 353 | counter++; |
354 | if ((DURATION.rel_value_us / 1000 / 1000LL) < counter) | 354 | if ((DURATION.rel_value_us / 1000 / 1000LL) < counter) |
@@ -472,7 +472,7 @@ run_measurement (unsigned long long p1_quota_in, | |||
472 | if ((p1 == NULL) || (p2 == NULL)) | 472 | if ((p1 == NULL) || (p2 == NULL)) |
473 | { | 473 | { |
474 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); | 474 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); |
475 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 475 | if (die_task != NULL) |
476 | GNUNET_SCHEDULER_cancel (die_task); | 476 | GNUNET_SCHEDULER_cancel (die_task); |
477 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 477 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
478 | return; | 478 | return; |
diff --git a/src/transport/test_transport_address_switch.c b/src/transport/test_transport_address_switch.c index fcbd798d0..10815c7ab 100644 --- a/src/transport/test_transport_address_switch.c +++ b/src/transport/test_transport_address_switch.c | |||
@@ -67,11 +67,11 @@ GNUNET_NETWORK_STRUCT_END | |||
67 | #define DURATION GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) | 67 | #define DURATION GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) |
68 | #define DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) | 68 | #define DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) |
69 | 69 | ||
70 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 70 | static struct GNUNET_SCHEDULER_Task * die_task; |
71 | 71 | ||
72 | static GNUNET_SCHEDULER_TaskIdentifier delayed_end_task; | 72 | static struct GNUNET_SCHEDULER_Task * delayed_end_task; |
73 | 73 | ||
74 | static GNUNET_SCHEDULER_TaskIdentifier measure_task; | 74 | static struct GNUNET_SCHEDULER_Task * measure_task; |
75 | 75 | ||
76 | struct PeerContext *p1; | 76 | struct PeerContext *p1; |
77 | char *cfg_file_p1; | 77 | char *cfg_file_p1; |
@@ -142,7 +142,7 @@ stat_start_attempt_cb (void *cls, const char *subsystem, const char *name, | |||
142 | else | 142 | else |
143 | return GNUNET_OK; | 143 | return GNUNET_OK; |
144 | 144 | ||
145 | if (GNUNET_SCHEDULER_NO_TASK == delayed_end_task) | 145 | if (NULL == delayed_end_task) |
146 | delayed_end_task = GNUNET_SCHEDULER_add_delayed (DELAY, &end, NULL ); | 146 | delayed_end_task = GNUNET_SCHEDULER_add_delayed (DELAY, &end, NULL ); |
147 | return GNUNET_OK; | 147 | return GNUNET_OK; |
148 | } | 148 | } |
@@ -207,22 +207,22 @@ stat_addresses_available (void *cls, const char *subsystem, const char *name, | |||
207 | static void | 207 | static void |
208 | clean_up () | 208 | clean_up () |
209 | { | 209 | { |
210 | if (measure_task != GNUNET_SCHEDULER_NO_TASK ) | 210 | if (measure_task != NULL ) |
211 | { | 211 | { |
212 | GNUNET_SCHEDULER_cancel (measure_task); | 212 | GNUNET_SCHEDULER_cancel (measure_task); |
213 | measure_task = GNUNET_SCHEDULER_NO_TASK; | 213 | measure_task = NULL; |
214 | } | 214 | } |
215 | 215 | ||
216 | if (delayed_end_task != GNUNET_SCHEDULER_NO_TASK ) | 216 | if (delayed_end_task != NULL ) |
217 | { | 217 | { |
218 | GNUNET_SCHEDULER_cancel (delayed_end_task); | 218 | GNUNET_SCHEDULER_cancel (delayed_end_task); |
219 | delayed_end_task = GNUNET_SCHEDULER_NO_TASK; | 219 | delayed_end_task = NULL; |
220 | } | 220 | } |
221 | 221 | ||
222 | if (die_task != GNUNET_SCHEDULER_NO_TASK ) | 222 | if (die_task != NULL ) |
223 | { | 223 | { |
224 | GNUNET_SCHEDULER_cancel (die_task); | 224 | GNUNET_SCHEDULER_cancel (die_task); |
225 | die_task = GNUNET_SCHEDULER_NO_TASK; | 225 | die_task = NULL; |
226 | } | 226 | } |
227 | 227 | ||
228 | if (NULL != p1_stat) | 228 | if (NULL != p1_stat) |
@@ -270,10 +270,10 @@ clean_up () | |||
270 | p2_stat = NULL; | 270 | p2_stat = NULL; |
271 | } | 271 | } |
272 | 272 | ||
273 | if (die_task != GNUNET_SCHEDULER_NO_TASK ) | 273 | if (die_task != NULL ) |
274 | { | 274 | { |
275 | GNUNET_SCHEDULER_cancel (die_task); | 275 | GNUNET_SCHEDULER_cancel (die_task); |
276 | die_task = GNUNET_SCHEDULER_NO_TASK; | 276 | die_task = NULL; |
277 | } | 277 | } |
278 | 278 | ||
279 | if (th != NULL ) | 279 | if (th != NULL ) |
@@ -308,7 +308,7 @@ end () | |||
308 | int result = 0; | 308 | int result = 0; |
309 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 309 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); |
310 | 310 | ||
311 | delayed_end_task = GNUNET_SCHEDULER_NO_TASK; | 311 | delayed_end_task = NULL; |
312 | FPRINTF (stderr, "\n"); | 312 | FPRINTF (stderr, "\n"); |
313 | if (p1_switch_attempts > 0) | 313 | if (p1_switch_attempts > 0) |
314 | { | 314 | { |
@@ -365,7 +365,7 @@ end () | |||
365 | static void | 365 | static void |
366 | end_badly () | 366 | end_badly () |
367 | { | 367 | { |
368 | die_task = GNUNET_SCHEDULER_NO_TASK; | 368 | die_task = NULL; |
369 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 369 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); |
370 | 370 | ||
371 | FPRINTF (stderr, "Peer 1 had %u addresses available, but did not try to switch\n", | 371 | FPRINTF (stderr, "Peer 1 had %u addresses available, but did not try to switch\n", |
@@ -432,7 +432,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
432 | { | 432 | { |
433 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, | 433 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, |
434 | "Timeout occurred while waiting for transmit_ready for message\n"); | 434 | "Timeout occurred while waiting for transmit_ready for message\n"); |
435 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 435 | if (NULL != die_task) |
436 | GNUNET_SCHEDULER_cancel (die_task); | 436 | GNUNET_SCHEDULER_cancel (die_task); |
437 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL ); | 437 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL ); |
438 | res = 1; | 438 | res = 1; |
@@ -534,7 +534,7 @@ measure (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
534 | { | 534 | { |
535 | static int counter; | 535 | static int counter; |
536 | 536 | ||
537 | measure_task = GNUNET_SCHEDULER_NO_TASK; | 537 | measure_task = NULL; |
538 | 538 | ||
539 | counter++; | 539 | counter++; |
540 | if ((DURATION.rel_value_us / 1000 / 1000LL) < counter) | 540 | if ((DURATION.rel_value_us / 1000 / 1000LL) < counter) |
@@ -608,7 +608,7 @@ run (void *cls, char * const *args, const char *cfgfile, | |||
608 | if ((p1 == NULL )|| (p2 == NULL)) | 608 | if ((p1 == NULL )|| (p2 == NULL)) |
609 | { | 609 | { |
610 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); | 610 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); |
611 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 611 | if (die_task != NULL) |
612 | GNUNET_SCHEDULER_cancel (die_task); | 612 | GNUNET_SCHEDULER_cancel (die_task); |
613 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 613 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
614 | return; | 614 | return; |
@@ -657,7 +657,7 @@ run (void *cls, char * const *args, const char *cfgfile, | |||
657 | if ((p1_stat == NULL )|| (p2_stat == NULL)) | 657 | if ((p1_stat == NULL )|| (p2_stat == NULL)) |
658 | { | 658 | { |
659 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not create statistics for peers!\n"); | 659 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not create statistics for peers!\n"); |
660 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 660 | if (die_task != NULL) |
661 | GNUNET_SCHEDULER_cancel (die_task); | 661 | GNUNET_SCHEDULER_cancel (die_task); |
662 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 662 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
663 | return; | 663 | return; |
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index 4456c1dbf..ce6db8ad1 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c | |||
@@ -58,9 +58,9 @@ static int s_connected; | |||
58 | 58 | ||
59 | static int s_sending; | 59 | static int s_sending; |
60 | 60 | ||
61 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 61 | static struct GNUNET_SCHEDULER_Task * die_task; |
62 | 62 | ||
63 | static GNUNET_SCHEDULER_TaskIdentifier send_task; | 63 | static struct GNUNET_SCHEDULER_Task * send_task; |
64 | 64 | ||
65 | static struct PeerContext *p1; | 65 | static struct PeerContext *p1; |
66 | 66 | ||
@@ -82,10 +82,10 @@ end () | |||
82 | { | 82 | { |
83 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stopping peers\n"); | 83 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stopping peers\n"); |
84 | 84 | ||
85 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 85 | if (send_task != NULL) |
86 | GNUNET_SCHEDULER_cancel (send_task); | 86 | GNUNET_SCHEDULER_cancel (send_task); |
87 | 87 | ||
88 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 88 | if (die_task != NULL) |
89 | GNUNET_SCHEDULER_cancel (die_task); | 89 | GNUNET_SCHEDULER_cancel (die_task); |
90 | 90 | ||
91 | if (th != NULL) | 91 | if (th != NULL) |
@@ -99,12 +99,12 @@ end () | |||
99 | static void | 99 | static void |
100 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 100 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
101 | { | 101 | { |
102 | die_task = GNUNET_SCHEDULER_NO_TASK; | 102 | die_task = NULL; |
103 | 103 | ||
104 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Fail! Stopping peers\n"); | 104 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Fail! Stopping peers\n"); |
105 | 105 | ||
106 | 106 | ||
107 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 107 | if (send_task != NULL) |
108 | GNUNET_SCHEDULER_cancel (send_task); | 108 | GNUNET_SCHEDULER_cancel (send_task); |
109 | 109 | ||
110 | if (cc != NULL) | 110 | if (cc != NULL) |
@@ -197,7 +197,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
197 | { | 197 | { |
198 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 198 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
199 | "Timeout occurred while waiting for transmit_ready\n"); | 199 | "Timeout occurred while waiting for transmit_ready\n"); |
200 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 200 | if (NULL != die_task) |
201 | GNUNET_SCHEDULER_cancel (die_task); | 201 | GNUNET_SCHEDULER_cancel (die_task); |
202 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 202 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
203 | ok = 42; | 203 | ok = 42; |
@@ -227,7 +227,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
227 | static void | 227 | static void |
228 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 228 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
229 | { | 229 | { |
230 | send_task = GNUNET_SCHEDULER_NO_TASK; | 230 | send_task = NULL; |
231 | 231 | ||
232 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 232 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
233 | return; | 233 | return; |
@@ -351,7 +351,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
351 | if ((p1 == NULL) || (p2 == NULL)) | 351 | if ((p1 == NULL) || (p2 == NULL)) |
352 | { | 352 | { |
353 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); | 353 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); |
354 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 354 | if (die_task != NULL) |
355 | GNUNET_SCHEDULER_cancel (die_task); | 355 | GNUNET_SCHEDULER_cancel (die_task); |
356 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 356 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
357 | return; | 357 | return; |
@@ -371,7 +371,7 @@ check () | |||
371 | GNUNET_GETOPT_OPTION_END | 371 | GNUNET_GETOPT_OPTION_END |
372 | }; | 372 | }; |
373 | 373 | ||
374 | send_task = GNUNET_SCHEDULER_NO_TASK; | 374 | send_task = NULL; |
375 | 375 | ||
376 | ok = 1; | 376 | ok = 1; |
377 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, | 377 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, |
diff --git a/src/transport/test_transport_api_bidirectional_connect.c b/src/transport/test_transport_api_bidirectional_connect.c index 64f39a4d8..032bf2b6e 100644 --- a/src/transport/test_transport_api_bidirectional_connect.c +++ b/src/transport/test_transport_api_bidirectional_connect.c | |||
@@ -49,9 +49,9 @@ static char *test_name; | |||
49 | 49 | ||
50 | static int ok; | 50 | static int ok; |
51 | 51 | ||
52 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 52 | static struct GNUNET_SCHEDULER_Task * die_task; |
53 | 53 | ||
54 | static GNUNET_SCHEDULER_TaskIdentifier send_task; | 54 | static struct GNUNET_SCHEDULER_Task * send_task; |
55 | 55 | ||
56 | static struct PeerContext *p1; | 56 | static struct PeerContext *p1; |
57 | 57 | ||
@@ -74,13 +74,13 @@ end () | |||
74 | { | 74 | { |
75 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 75 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); |
76 | 76 | ||
77 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 77 | if (send_task != NULL) |
78 | { | 78 | { |
79 | GNUNET_SCHEDULER_cancel (send_task); | 79 | GNUNET_SCHEDULER_cancel (send_task); |
80 | send_task = GNUNET_SCHEDULER_NO_TASK; | 80 | send_task = NULL; |
81 | } | 81 | } |
82 | 82 | ||
83 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 83 | if (die_task != NULL) |
84 | GNUNET_SCHEDULER_cancel (die_task); | 84 | GNUNET_SCHEDULER_cancel (die_task); |
85 | 85 | ||
86 | if (NULL != th) | 86 | if (NULL != th) |
@@ -97,12 +97,12 @@ end () | |||
97 | static void | 97 | static void |
98 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 98 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
99 | { | 99 | { |
100 | die_task = GNUNET_SCHEDULER_NO_TASK; | 100 | die_task = NULL; |
101 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 101 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); |
102 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 102 | if (send_task != NULL) |
103 | { | 103 | { |
104 | GNUNET_SCHEDULER_cancel (send_task); | 104 | GNUNET_SCHEDULER_cancel (send_task); |
105 | send_task = GNUNET_SCHEDULER_NO_TASK; | 105 | send_task = NULL; |
106 | } | 106 | } |
107 | 107 | ||
108 | if (NULL != cc2) | 108 | if (NULL != cc2) |
@@ -177,7 +177,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
177 | { | 177 | { |
178 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 178 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
179 | "Timeout occurred while waiting for transmit_ready\n"); | 179 | "Timeout occurred while waiting for transmit_ready\n"); |
180 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 180 | if (NULL != die_task) |
181 | GNUNET_SCHEDULER_cancel (die_task); | 181 | GNUNET_SCHEDULER_cancel (die_task); |
182 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 182 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
183 | ok = 42; | 183 | ok = 42; |
@@ -206,7 +206,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
206 | static void | 206 | static void |
207 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 207 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
208 | { | 208 | { |
209 | send_task = GNUNET_SCHEDULER_NO_TASK; | 209 | send_task = NULL; |
210 | 210 | ||
211 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 211 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
212 | return; | 212 | return; |
@@ -260,11 +260,11 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
260 | GNUNET_i2s (peer)); | 260 | GNUNET_i2s (peer)); |
261 | GNUNET_free (ps); | 261 | GNUNET_free (ps); |
262 | 262 | ||
263 | if (GNUNET_SCHEDULER_NO_TASK != send_task) | 263 | if (NULL != send_task) |
264 | { | 264 | { |
265 | GNUNET_SCHEDULER_cancel(send_task); | 265 | GNUNET_SCHEDULER_cancel(send_task); |
266 | GNUNET_break (0); | 266 | GNUNET_break (0); |
267 | send_task = GNUNET_SCHEDULER_NO_TASK; | 267 | send_task = NULL; |
268 | } | 268 | } |
269 | if (NULL != th) | 269 | if (NULL != th) |
270 | { | 270 | { |
@@ -350,7 +350,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
350 | if ((p1 == NULL) || (p2 == NULL)) | 350 | if ((p1 == NULL) || (p2 == NULL)) |
351 | { | 351 | { |
352 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); | 352 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); |
353 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 353 | if (die_task != NULL) |
354 | GNUNET_SCHEDULER_cancel (die_task); | 354 | GNUNET_SCHEDULER_cancel (die_task); |
355 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 355 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
356 | return; | 356 | return; |
@@ -373,7 +373,7 @@ check () | |||
373 | #if WRITECONFIG | 373 | #if WRITECONFIG |
374 | setTransportOptions ("test_transport_api_data.conf"); | 374 | setTransportOptions ("test_transport_api_data.conf"); |
375 | #endif | 375 | #endif |
376 | send_task = GNUNET_SCHEDULER_NO_TASK; | 376 | send_task = NULL; |
377 | 377 | ||
378 | ok = 1; | 378 | ok = 1; |
379 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, | 379 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, |
diff --git a/src/transport/test_transport_api_blacklisting.c b/src/transport/test_transport_api_blacklisting.c index 2c3ab125a..09a12cef8 100644 --- a/src/transport/test_transport_api_blacklisting.c +++ b/src/transport/test_transport_api_blacklisting.c | |||
@@ -62,11 +62,11 @@ static struct GNUNET_TRANSPORT_Blacklist * blacklist_p1; | |||
62 | 62 | ||
63 | static struct GNUNET_TRANSPORT_Blacklist * blacklist_p2; | 63 | static struct GNUNET_TRANSPORT_Blacklist * blacklist_p2; |
64 | 64 | ||
65 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 65 | static struct GNUNET_SCHEDULER_Task * die_task; |
66 | 66 | ||
67 | static GNUNET_SCHEDULER_TaskIdentifier send_task; | 67 | static struct GNUNET_SCHEDULER_Task * send_task; |
68 | 68 | ||
69 | static GNUNET_SCHEDULER_TaskIdentifier shutdown_task; | 69 | static struct GNUNET_SCHEDULER_Task * shutdown_task; |
70 | 70 | ||
71 | #if VERBOSE | 71 | #if VERBOSE |
72 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 72 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
@@ -80,13 +80,13 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
80 | { | 80 | { |
81 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping\n"); | 81 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping\n"); |
82 | 82 | ||
83 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 83 | if (send_task != NULL) |
84 | GNUNET_SCHEDULER_cancel (send_task); | 84 | GNUNET_SCHEDULER_cancel (send_task); |
85 | 85 | ||
86 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 86 | if (die_task != NULL) |
87 | { | 87 | { |
88 | GNUNET_SCHEDULER_cancel (die_task); | 88 | GNUNET_SCHEDULER_cancel (die_task); |
89 | die_task = GNUNET_SCHEDULER_NO_TASK; | 89 | die_task = NULL; |
90 | } | 90 | } |
91 | 91 | ||
92 | if (cc != NULL) | 92 | if (cc != NULL) |
@@ -139,16 +139,16 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
139 | static void | 139 | static void |
140 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 140 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
141 | { | 141 | { |
142 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 142 | if (send_task != NULL) |
143 | { | 143 | { |
144 | GNUNET_SCHEDULER_cancel (send_task); | 144 | GNUNET_SCHEDULER_cancel (send_task); |
145 | send_task = GNUNET_SCHEDULER_NO_TASK; | 145 | send_task = NULL; |
146 | } | 146 | } |
147 | 147 | ||
148 | if (shutdown_task != GNUNET_SCHEDULER_NO_TASK) | 148 | if (shutdown_task != NULL) |
149 | { | 149 | { |
150 | GNUNET_SCHEDULER_cancel (shutdown_task); | 150 | GNUNET_SCHEDULER_cancel (shutdown_task); |
151 | shutdown_task = GNUNET_SCHEDULER_NO_TASK; | 151 | shutdown_task = NULL; |
152 | } | 152 | } |
153 | 153 | ||
154 | if (cc != NULL) | 154 | if (cc != NULL) |
@@ -225,10 +225,10 @@ notify_ready (void *cls, size_t size, void *buf) | |||
225 | { | 225 | { |
226 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 226 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
227 | "Timeout occurred while waiting for transmit_ready\n"); | 227 | "Timeout occurred while waiting for transmit_ready\n"); |
228 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 228 | if (NULL != die_task) |
229 | { | 229 | { |
230 | GNUNET_SCHEDULER_cancel (die_task); | 230 | GNUNET_SCHEDULER_cancel (die_task); |
231 | die_task = GNUNET_SCHEDULER_NO_TASK; | 231 | die_task = NULL; |
232 | } | 232 | } |
233 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 233 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
234 | ok = 42; | 234 | ok = 42; |
@@ -257,7 +257,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
257 | static void | 257 | static void |
258 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 258 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
259 | { | 259 | { |
260 | send_task = GNUNET_SCHEDULER_NO_TASK; | 260 | send_task = NULL; |
261 | 261 | ||
262 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 262 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
263 | return; | 263 | return; |
@@ -359,7 +359,7 @@ blacklist_cb (void *cls, | |||
359 | res = GNUNET_SYSERR; | 359 | res = GNUNET_SYSERR; |
360 | } | 360 | } |
361 | 361 | ||
362 | if (((blacklist_request_p2 == GNUNET_YES) && (blacklist_request_p1 == GNUNET_YES)) && (shutdown_task == GNUNET_SCHEDULER_NO_TASK)) | 362 | if (((blacklist_request_p2 == GNUNET_YES) && (blacklist_request_p1 == GNUNET_YES)) && (shutdown_task == NULL)) |
363 | { | 363 | { |
364 | shutdown_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 3), &end, NULL); | 364 | shutdown_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 3), &end, NULL); |
365 | } | 365 | } |
diff --git a/src/transport/test_transport_api_disconnect.c b/src/transport/test_transport_api_disconnect.c index 3f8246142..607b3480b 100644 --- a/src/transport/test_transport_api_disconnect.c +++ b/src/transport/test_transport_api_disconnect.c | |||
@@ -47,9 +47,9 @@ static char *test_name; | |||
47 | 47 | ||
48 | static int ok; | 48 | static int ok; |
49 | 49 | ||
50 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 50 | static struct GNUNET_SCHEDULER_Task * die_task; |
51 | 51 | ||
52 | static GNUNET_SCHEDULER_TaskIdentifier send_task; | 52 | static struct GNUNET_SCHEDULER_Task * send_task; |
53 | 53 | ||
54 | struct PeerContext *p1; | 54 | struct PeerContext *p1; |
55 | 55 | ||
@@ -79,16 +79,16 @@ end () | |||
79 | { | 79 | { |
80 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 80 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); |
81 | 81 | ||
82 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 82 | if (send_task != NULL) |
83 | { | 83 | { |
84 | GNUNET_SCHEDULER_cancel (send_task); | 84 | GNUNET_SCHEDULER_cancel (send_task); |
85 | send_task = GNUNET_SCHEDULER_NO_TASK; | 85 | send_task = NULL; |
86 | } | 86 | } |
87 | 87 | ||
88 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 88 | if (die_task != NULL) |
89 | { | 89 | { |
90 | GNUNET_SCHEDULER_cancel (die_task); | 90 | GNUNET_SCHEDULER_cancel (die_task); |
91 | die_task = GNUNET_SCHEDULER_NO_TASK; | 91 | die_task = NULL; |
92 | } | 92 | } |
93 | 93 | ||
94 | if (th != NULL) | 94 | if (th != NULL) |
@@ -110,7 +110,7 @@ end () | |||
110 | static void | 110 | static void |
111 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 111 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
112 | { | 112 | { |
113 | die_task = GNUNET_SCHEDULER_NO_TASK; | 113 | die_task = NULL; |
114 | 114 | ||
115 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 115 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); |
116 | 116 | ||
@@ -120,10 +120,10 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
120 | cc = NULL; | 120 | cc = NULL; |
121 | } | 121 | } |
122 | 122 | ||
123 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 123 | if (send_task != NULL) |
124 | { | 124 | { |
125 | GNUNET_SCHEDULER_cancel (send_task); | 125 | GNUNET_SCHEDULER_cancel (send_task); |
126 | send_task = GNUNET_SCHEDULER_NO_TASK; | 126 | send_task = NULL; |
127 | } | 127 | } |
128 | 128 | ||
129 | if (th != NULL) | 129 | if (th != NULL) |
@@ -221,7 +221,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
221 | { | 221 | { |
222 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 222 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
223 | "Timeout occurred while waiting for transmit_ready\n"); | 223 | "Timeout occurred while waiting for transmit_ready\n"); |
224 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 224 | if (NULL != die_task) |
225 | GNUNET_SCHEDULER_cancel (die_task); | 225 | GNUNET_SCHEDULER_cancel (die_task); |
226 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 226 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
227 | ok = 42; | 227 | ok = 42; |
@@ -250,7 +250,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
250 | static void | 250 | static void |
251 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 251 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
252 | { | 252 | { |
253 | send_task = GNUNET_SCHEDULER_NO_TASK; | 253 | send_task = NULL; |
254 | 254 | ||
255 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 255 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
256 | return; | 256 | return; |
@@ -347,7 +347,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
347 | if ((p1 == NULL) || (p2 == NULL)) | 347 | if ((p1 == NULL) || (p2 == NULL)) |
348 | { | 348 | { |
349 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); | 349 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); |
350 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 350 | if (die_task != NULL) |
351 | GNUNET_SCHEDULER_cancel (die_task); | 351 | GNUNET_SCHEDULER_cancel (die_task); |
352 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 352 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
353 | return; | 353 | return; |
@@ -367,7 +367,7 @@ check () | |||
367 | GNUNET_GETOPT_OPTION_END | 367 | GNUNET_GETOPT_OPTION_END |
368 | }; | 368 | }; |
369 | 369 | ||
370 | send_task = GNUNET_SCHEDULER_NO_TASK; | 370 | send_task = NULL; |
371 | 371 | ||
372 | ok = 1; | 372 | ok = 1; |
373 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, | 373 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, |
diff --git a/src/transport/test_transport_api_limited_sockets.c b/src/transport/test_transport_api_limited_sockets.c index 617be38d4..cc1953f77 100644 --- a/src/transport/test_transport_api_limited_sockets.c +++ b/src/transport/test_transport_api_limited_sockets.c | |||
@@ -55,9 +55,9 @@ static char *test_name; | |||
55 | 55 | ||
56 | static int ok; | 56 | static int ok; |
57 | 57 | ||
58 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 58 | static struct GNUNET_SCHEDULER_Task * die_task; |
59 | 59 | ||
60 | static GNUNET_SCHEDULER_TaskIdentifier send_task; | 60 | static struct GNUNET_SCHEDULER_Task * send_task; |
61 | 61 | ||
62 | static struct PeerContext *p1; | 62 | static struct PeerContext *p1; |
63 | 63 | ||
@@ -85,10 +85,10 @@ end () | |||
85 | { | 85 | { |
86 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 86 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); |
87 | 87 | ||
88 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 88 | if (send_task != NULL) |
89 | GNUNET_SCHEDULER_cancel (send_task); | 89 | GNUNET_SCHEDULER_cancel (send_task); |
90 | 90 | ||
91 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 91 | if (die_task != NULL) |
92 | GNUNET_SCHEDULER_cancel (die_task); | 92 | GNUNET_SCHEDULER_cancel (die_task); |
93 | 93 | ||
94 | if (th != NULL) | 94 | if (th != NULL) |
@@ -104,11 +104,11 @@ end () | |||
104 | static void | 104 | static void |
105 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 105 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
106 | { | 106 | { |
107 | die_task = GNUNET_SCHEDULER_NO_TASK; | 107 | die_task = NULL; |
108 | 108 | ||
109 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 109 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); |
110 | 110 | ||
111 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 111 | if (send_task != NULL) |
112 | GNUNET_SCHEDULER_cancel (send_task); | 112 | GNUNET_SCHEDULER_cancel (send_task); |
113 | 113 | ||
114 | if (cc != NULL) | 114 | if (cc != NULL) |
@@ -197,7 +197,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
197 | static void | 197 | static void |
198 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 198 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
199 | { | 199 | { |
200 | send_task = GNUNET_SCHEDULER_NO_TASK; | 200 | send_task = NULL; |
201 | 201 | ||
202 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 202 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
203 | return; | 203 | return; |
@@ -259,7 +259,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
259 | if ((p1 == NULL) || (p2 == NULL)) | 259 | if ((p1 == NULL) || (p2 == NULL)) |
260 | { | 260 | { |
261 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); | 261 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); |
262 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 262 | if (die_task != NULL) |
263 | GNUNET_SCHEDULER_cancel (die_task); | 263 | GNUNET_SCHEDULER_cancel (die_task); |
264 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 264 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
265 | return; | 265 | return; |
@@ -282,7 +282,7 @@ check () | |||
282 | #if WRITECONFIG | 282 | #if WRITECONFIG |
283 | setTransportOptions ("test_transport_api_data.conf"); | 283 | setTransportOptions ("test_transport_api_data.conf"); |
284 | #endif | 284 | #endif |
285 | send_task = GNUNET_SCHEDULER_NO_TASK; | 285 | send_task = NULL; |
286 | 286 | ||
287 | ok = 1; | 287 | ok = 1; |
288 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, | 288 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, |
diff --git a/src/transport/test_transport_api_manipulation_cfg.c b/src/transport/test_transport_api_manipulation_cfg.c index 49e74ffaf..e7cccb812 100644 --- a/src/transport/test_transport_api_manipulation_cfg.c +++ b/src/transport/test_transport_api_manipulation_cfg.c | |||
@@ -67,9 +67,9 @@ static int s_connected; | |||
67 | 67 | ||
68 | static int s_sending; | 68 | static int s_sending; |
69 | 69 | ||
70 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 70 | static struct GNUNET_SCHEDULER_Task * die_task; |
71 | 71 | ||
72 | static GNUNET_SCHEDULER_TaskIdentifier send_task; | 72 | static struct GNUNET_SCHEDULER_Task * send_task; |
73 | 73 | ||
74 | static struct PeerContext *p1; | 74 | static struct PeerContext *p1; |
75 | 75 | ||
@@ -93,10 +93,10 @@ end () | |||
93 | { | 93 | { |
94 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 94 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); |
95 | 95 | ||
96 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 96 | if (send_task != NULL) |
97 | GNUNET_SCHEDULER_cancel (send_task); | 97 | GNUNET_SCHEDULER_cancel (send_task); |
98 | 98 | ||
99 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 99 | if (die_task != NULL) |
100 | GNUNET_SCHEDULER_cancel (die_task); | 100 | GNUNET_SCHEDULER_cancel (die_task); |
101 | 101 | ||
102 | if (th != NULL) | 102 | if (th != NULL) |
@@ -110,12 +110,12 @@ end () | |||
110 | static void | 110 | static void |
111 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 111 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
112 | { | 112 | { |
113 | die_task = GNUNET_SCHEDULER_NO_TASK; | 113 | die_task = NULL; |
114 | 114 | ||
115 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 115 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); |
116 | 116 | ||
117 | 117 | ||
118 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 118 | if (send_task != NULL) |
119 | GNUNET_SCHEDULER_cancel (send_task); | 119 | GNUNET_SCHEDULER_cancel (send_task); |
120 | 120 | ||
121 | if (cc != NULL) | 121 | if (cc != NULL) |
@@ -172,7 +172,7 @@ notify_request_ready (void *cls, size_t size, void *buf) | |||
172 | { | 172 | { |
173 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 173 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
174 | "Timeout occurred while waiting for transmit_ready\n"); | 174 | "Timeout occurred while waiting for transmit_ready\n"); |
175 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 175 | if (NULL != die_task) |
176 | GNUNET_SCHEDULER_cancel (die_task); | 176 | GNUNET_SCHEDULER_cancel (die_task); |
177 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 177 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
178 | ok = 42; | 178 | ok = 42; |
@@ -201,7 +201,7 @@ notify_request_ready (void *cls, size_t size, void *buf) | |||
201 | static void | 201 | static void |
202 | sendtask_request_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 202 | sendtask_request_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
203 | { | 203 | { |
204 | send_task = GNUNET_SCHEDULER_NO_TASK; | 204 | send_task = NULL; |
205 | 205 | ||
206 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 206 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
207 | return; | 207 | return; |
@@ -232,7 +232,7 @@ notify_response_ready (void *cls, size_t size, void *buf) | |||
232 | { | 232 | { |
233 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 233 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
234 | "Timeout occurred while waiting for transmit_ready\n"); | 234 | "Timeout occurred while waiting for transmit_ready\n"); |
235 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 235 | if (NULL != die_task) |
236 | GNUNET_SCHEDULER_cancel (die_task); | 236 | GNUNET_SCHEDULER_cancel (die_task); |
237 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 237 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
238 | ok = 42; | 238 | ok = 42; |
@@ -261,7 +261,7 @@ notify_response_ready (void *cls, size_t size, void *buf) | |||
261 | static void | 261 | static void |
262 | sendtask_response_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 262 | sendtask_response_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
263 | { | 263 | { |
264 | send_task = GNUNET_SCHEDULER_NO_TASK; | 264 | send_task = NULL; |
265 | 265 | ||
266 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 266 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
267 | return; | 267 | return; |
@@ -458,7 +458,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
458 | if ((p1 == NULL) || (p2 == NULL)) | 458 | if ((p1 == NULL) || (p2 == NULL)) |
459 | { | 459 | { |
460 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); | 460 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); |
461 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 461 | if (die_task != NULL) |
462 | GNUNET_SCHEDULER_cancel (die_task); | 462 | GNUNET_SCHEDULER_cancel (die_task); |
463 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 463 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
464 | return; | 464 | return; |
@@ -478,7 +478,7 @@ check () | |||
478 | GNUNET_GETOPT_OPTION_END | 478 | GNUNET_GETOPT_OPTION_END |
479 | }; | 479 | }; |
480 | 480 | ||
481 | send_task = GNUNET_SCHEDULER_NO_TASK; | 481 | send_task = NULL; |
482 | 482 | ||
483 | ok = 1; | 483 | ok = 1; |
484 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, | 484 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, |
diff --git a/src/transport/test_transport_api_manipulation_recv_tcp.c b/src/transport/test_transport_api_manipulation_recv_tcp.c index 6b86e9ff1..76bd360ab 100644 --- a/src/transport/test_transport_api_manipulation_recv_tcp.c +++ b/src/transport/test_transport_api_manipulation_recv_tcp.c | |||
@@ -59,9 +59,9 @@ static int s_connected; | |||
59 | 59 | ||
60 | static int s_sending; | 60 | static int s_sending; |
61 | 61 | ||
62 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 62 | static struct GNUNET_SCHEDULER_Task * die_task; |
63 | 63 | ||
64 | static GNUNET_SCHEDULER_TaskIdentifier send_task; | 64 | static struct GNUNET_SCHEDULER_Task * send_task; |
65 | 65 | ||
66 | static struct PeerContext *p1; | 66 | static struct PeerContext *p1; |
67 | 67 | ||
@@ -90,10 +90,10 @@ end () | |||
90 | { | 90 | { |
91 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 91 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); |
92 | 92 | ||
93 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 93 | if (send_task != NULL) |
94 | GNUNET_SCHEDULER_cancel (send_task); | 94 | GNUNET_SCHEDULER_cancel (send_task); |
95 | 95 | ||
96 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 96 | if (die_task != NULL) |
97 | GNUNET_SCHEDULER_cancel (die_task); | 97 | GNUNET_SCHEDULER_cancel (die_task); |
98 | 98 | ||
99 | if (th != NULL) | 99 | if (th != NULL) |
@@ -107,12 +107,12 @@ end () | |||
107 | static void | 107 | static void |
108 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 108 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
109 | { | 109 | { |
110 | die_task = GNUNET_SCHEDULER_NO_TASK; | 110 | die_task = NULL; |
111 | 111 | ||
112 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 112 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); |
113 | 113 | ||
114 | 114 | ||
115 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 115 | if (send_task != NULL) |
116 | GNUNET_SCHEDULER_cancel (send_task); | 116 | GNUNET_SCHEDULER_cancel (send_task); |
117 | 117 | ||
118 | if (cc != NULL) | 118 | if (cc != NULL) |
@@ -252,7 +252,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
252 | { | 252 | { |
253 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 253 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
254 | "Timeout occurred while waiting for transmit_ready\n"); | 254 | "Timeout occurred while waiting for transmit_ready\n"); |
255 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 255 | if (NULL != die_task) |
256 | GNUNET_SCHEDULER_cancel (die_task); | 256 | GNUNET_SCHEDULER_cancel (die_task); |
257 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 257 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
258 | ok = 42; | 258 | ok = 42; |
@@ -282,7 +282,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
282 | static void | 282 | static void |
283 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 283 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
284 | { | 284 | { |
285 | send_task = GNUNET_SCHEDULER_NO_TASK; | 285 | send_task = NULL; |
286 | 286 | ||
287 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 287 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
288 | return; | 288 | return; |
@@ -416,7 +416,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
416 | if ((p1 == NULL) || (p2 == NULL)) | 416 | if ((p1 == NULL) || (p2 == NULL)) |
417 | { | 417 | { |
418 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); | 418 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); |
419 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 419 | if (die_task != NULL) |
420 | GNUNET_SCHEDULER_cancel (die_task); | 420 | GNUNET_SCHEDULER_cancel (die_task); |
421 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 421 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
422 | return; | 422 | return; |
@@ -436,7 +436,7 @@ check () | |||
436 | GNUNET_GETOPT_OPTION_END | 436 | GNUNET_GETOPT_OPTION_END |
437 | }; | 437 | }; |
438 | 438 | ||
439 | send_task = GNUNET_SCHEDULER_NO_TASK; | 439 | send_task = NULL; |
440 | 440 | ||
441 | ok = 1; | 441 | ok = 1; |
442 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, | 442 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, |
diff --git a/src/transport/test_transport_api_manipulation_send_tcp.c b/src/transport/test_transport_api_manipulation_send_tcp.c index 381d7d38a..f1ead389c 100644 --- a/src/transport/test_transport_api_manipulation_send_tcp.c +++ b/src/transport/test_transport_api_manipulation_send_tcp.c | |||
@@ -59,9 +59,9 @@ static int s_connected; | |||
59 | 59 | ||
60 | static int s_sending; | 60 | static int s_sending; |
61 | 61 | ||
62 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 62 | static struct GNUNET_SCHEDULER_Task * die_task; |
63 | 63 | ||
64 | static GNUNET_SCHEDULER_TaskIdentifier send_task; | 64 | static struct GNUNET_SCHEDULER_Task * send_task; |
65 | 65 | ||
66 | static struct PeerContext *p1; | 66 | static struct PeerContext *p1; |
67 | 67 | ||
@@ -90,10 +90,10 @@ end () | |||
90 | { | 90 | { |
91 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 91 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); |
92 | 92 | ||
93 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 93 | if (send_task != NULL) |
94 | GNUNET_SCHEDULER_cancel (send_task); | 94 | GNUNET_SCHEDULER_cancel (send_task); |
95 | 95 | ||
96 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 96 | if (die_task != NULL) |
97 | GNUNET_SCHEDULER_cancel (die_task); | 97 | GNUNET_SCHEDULER_cancel (die_task); |
98 | 98 | ||
99 | if (th != NULL) | 99 | if (th != NULL) |
@@ -107,12 +107,12 @@ end () | |||
107 | static void | 107 | static void |
108 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 108 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
109 | { | 109 | { |
110 | die_task = GNUNET_SCHEDULER_NO_TASK; | 110 | die_task = NULL; |
111 | 111 | ||
112 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 112 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); |
113 | 113 | ||
114 | 114 | ||
115 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 115 | if (send_task != NULL) |
116 | GNUNET_SCHEDULER_cancel (send_task); | 116 | GNUNET_SCHEDULER_cancel (send_task); |
117 | 117 | ||
118 | if (cc != NULL) | 118 | if (cc != NULL) |
@@ -244,7 +244,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
244 | { | 244 | { |
245 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 245 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
246 | "Timeout occurred while waiting for transmit_ready\n"); | 246 | "Timeout occurred while waiting for transmit_ready\n"); |
247 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 247 | if (NULL != die_task) |
248 | GNUNET_SCHEDULER_cancel (die_task); | 248 | GNUNET_SCHEDULER_cancel (die_task); |
249 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 249 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
250 | ok = 42; | 250 | ok = 42; |
@@ -275,7 +275,7 @@ static void | |||
275 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 275 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
276 | { | 276 | { |
277 | struct GNUNET_ATS_Information ats[1]; | 277 | struct GNUNET_ATS_Information ats[1]; |
278 | send_task = GNUNET_SCHEDULER_NO_TASK; | 278 | send_task = NULL; |
279 | 279 | ||
280 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 280 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
281 | return; | 281 | return; |
@@ -424,7 +424,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
424 | if ((p1 == NULL) || (p2 == NULL)) | 424 | if ((p1 == NULL) || (p2 == NULL)) |
425 | { | 425 | { |
426 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); | 426 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); |
427 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 427 | if (die_task != NULL) |
428 | GNUNET_SCHEDULER_cancel (die_task); | 428 | GNUNET_SCHEDULER_cancel (die_task); |
429 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 429 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
430 | return; | 430 | return; |
@@ -444,7 +444,7 @@ check () | |||
444 | GNUNET_GETOPT_OPTION_END | 444 | GNUNET_GETOPT_OPTION_END |
445 | }; | 445 | }; |
446 | 446 | ||
447 | send_task = GNUNET_SCHEDULER_NO_TASK; | 447 | send_task = NULL; |
448 | 448 | ||
449 | ok = 1; | 449 | ok = 1; |
450 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, | 450 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, |
diff --git a/src/transport/test_transport_api_monitor_peers.c b/src/transport/test_transport_api_monitor_peers.c index fd6abe53b..ef425d444 100644 --- a/src/transport/test_transport_api_monitor_peers.c +++ b/src/transport/test_transport_api_monitor_peers.c | |||
@@ -53,9 +53,9 @@ static int s_connected; | |||
53 | 53 | ||
54 | static int s_sending; | 54 | static int s_sending; |
55 | 55 | ||
56 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 56 | static struct GNUNET_SCHEDULER_Task * die_task; |
57 | 57 | ||
58 | static GNUNET_SCHEDULER_TaskIdentifier send_task; | 58 | static struct GNUNET_SCHEDULER_Task * send_task; |
59 | 59 | ||
60 | static struct PeerContext *p1; | 60 | static struct PeerContext *p1; |
61 | 61 | ||
@@ -90,13 +90,13 @@ end () | |||
90 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 90 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
91 | "Stopping peers\n"); | 91 | "Stopping peers\n"); |
92 | 92 | ||
93 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 93 | if (send_task != NULL) |
94 | GNUNET_SCHEDULER_cancel (send_task); | 94 | GNUNET_SCHEDULER_cancel (send_task); |
95 | 95 | ||
96 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 96 | if (die_task != NULL) |
97 | { | 97 | { |
98 | GNUNET_SCHEDULER_cancel (die_task); | 98 | GNUNET_SCHEDULER_cancel (die_task); |
99 | die_task = GNUNET_SCHEDULER_NO_TASK; | 99 | die_task = NULL; |
100 | } | 100 | } |
101 | 101 | ||
102 | if (th != NULL) | 102 | if (th != NULL) |
@@ -131,12 +131,12 @@ static void | |||
131 | end_badly (void *cls, | 131 | end_badly (void *cls, |
132 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 132 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
133 | { | 133 | { |
134 | die_task = GNUNET_SCHEDULER_NO_TASK; | 134 | die_task = NULL; |
135 | 135 | ||
136 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Fail! Stopping peers\n"); | 136 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Fail! Stopping peers\n"); |
137 | 137 | ||
138 | 138 | ||
139 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 139 | if (send_task != NULL) |
140 | GNUNET_SCHEDULER_cancel (send_task); | 140 | GNUNET_SCHEDULER_cancel (send_task); |
141 | 141 | ||
142 | if (cc != NULL) | 142 | if (cc != NULL) |
@@ -227,7 +227,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
227 | { | 227 | { |
228 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 228 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
229 | "Timeout occurred while waiting for transmit_ready\n"); | 229 | "Timeout occurred while waiting for transmit_ready\n"); |
230 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 230 | if (NULL != die_task) |
231 | GNUNET_SCHEDULER_cancel (die_task); | 231 | GNUNET_SCHEDULER_cancel (die_task); |
232 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 232 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
233 | ok = 42; | 233 | ok = 42; |
@@ -257,7 +257,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
257 | static void | 257 | static void |
258 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 258 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
259 | { | 259 | { |
260 | send_task = GNUNET_SCHEDULER_NO_TASK; | 260 | send_task = NULL; |
261 | 261 | ||
262 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 262 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
263 | return; | 263 | return; |
@@ -460,7 +460,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
460 | if ((p1 == NULL) || (p2 == NULL)) | 460 | if ((p1 == NULL) || (p2 == NULL)) |
461 | { | 461 | { |
462 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); | 462 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); |
463 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 463 | if (die_task != NULL) |
464 | GNUNET_SCHEDULER_cancel (die_task); | 464 | GNUNET_SCHEDULER_cancel (die_task); |
465 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 465 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
466 | return; | 466 | return; |
@@ -480,7 +480,7 @@ check () | |||
480 | GNUNET_GETOPT_OPTION_END | 480 | GNUNET_GETOPT_OPTION_END |
481 | }; | 481 | }; |
482 | 482 | ||
483 | send_task = GNUNET_SCHEDULER_NO_TASK; | 483 | send_task = NULL; |
484 | 484 | ||
485 | ok = 1; | 485 | ok = 1; |
486 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, | 486 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, |
diff --git a/src/transport/test_transport_api_monitor_validation.c b/src/transport/test_transport_api_monitor_validation.c index 11839b20c..261f1a7d0 100644 --- a/src/transport/test_transport_api_monitor_validation.c +++ b/src/transport/test_transport_api_monitor_validation.c | |||
@@ -56,9 +56,9 @@ static int s_connected; | |||
56 | 56 | ||
57 | static int s_sending; | 57 | static int s_sending; |
58 | 58 | ||
59 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 59 | static struct GNUNET_SCHEDULER_Task * die_task; |
60 | 60 | ||
61 | static GNUNET_SCHEDULER_TaskIdentifier send_task; | 61 | static struct GNUNET_SCHEDULER_Task * send_task; |
62 | 62 | ||
63 | static struct PeerContext *p1; | 63 | static struct PeerContext *p1; |
64 | 64 | ||
@@ -92,10 +92,10 @@ end () | |||
92 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stopping peers\n"); | 92 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stopping peers\n"); |
93 | 93 | ||
94 | 94 | ||
95 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 95 | if (send_task != NULL) |
96 | GNUNET_SCHEDULER_cancel (send_task); | 96 | GNUNET_SCHEDULER_cancel (send_task); |
97 | 97 | ||
98 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 98 | if (die_task != NULL) |
99 | GNUNET_SCHEDULER_cancel (die_task); | 99 | GNUNET_SCHEDULER_cancel (die_task); |
100 | 100 | ||
101 | if (th != NULL) | 101 | if (th != NULL) |
@@ -124,12 +124,12 @@ end () | |||
124 | static void | 124 | static void |
125 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 125 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
126 | { | 126 | { |
127 | die_task = GNUNET_SCHEDULER_NO_TASK; | 127 | die_task = NULL; |
128 | 128 | ||
129 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Fail! Stopping peers\n"); | 129 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Fail! Stopping peers\n"); |
130 | 130 | ||
131 | 131 | ||
132 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 132 | if (send_task != NULL) |
133 | GNUNET_SCHEDULER_cancel (send_task); | 133 | GNUNET_SCHEDULER_cancel (send_task); |
134 | 134 | ||
135 | if (cc != NULL) | 135 | if (cc != NULL) |
@@ -219,7 +219,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
219 | 219 | ||
220 | if ((0 >= p1_c) || (0 >= p2_c)) | 220 | if ((0 >= p1_c) || (0 >= p2_c)) |
221 | { | 221 | { |
222 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 222 | if (NULL != die_task) |
223 | GNUNET_SCHEDULER_cancel (die_task); | 223 | GNUNET_SCHEDULER_cancel (die_task); |
224 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 224 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
225 | } | 225 | } |
@@ -240,7 +240,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
240 | { | 240 | { |
241 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 241 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
242 | "Timeout occurred while waiting for transmit_ready\n"); | 242 | "Timeout occurred while waiting for transmit_ready\n"); |
243 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 243 | if (NULL != die_task) |
244 | GNUNET_SCHEDULER_cancel (die_task); | 244 | GNUNET_SCHEDULER_cancel (die_task); |
245 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 245 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
246 | ok = 42; | 246 | ok = 42; |
@@ -270,7 +270,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
270 | static void | 270 | static void |
271 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 271 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
272 | { | 272 | { |
273 | send_task = GNUNET_SCHEDULER_NO_TASK; | 273 | send_task = NULL; |
274 | 274 | ||
275 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 275 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
276 | return; | 276 | return; |
@@ -454,7 +454,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
454 | if ((p1 == NULL) || (p2 == NULL)) | 454 | if ((p1 == NULL) || (p2 == NULL)) |
455 | { | 455 | { |
456 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); | 456 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); |
457 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 457 | if (die_task != NULL) |
458 | GNUNET_SCHEDULER_cancel (die_task); | 458 | GNUNET_SCHEDULER_cancel (die_task); |
459 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 459 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
460 | return; | 460 | return; |
@@ -474,7 +474,7 @@ check () | |||
474 | GNUNET_GETOPT_OPTION_END | 474 | GNUNET_GETOPT_OPTION_END |
475 | }; | 475 | }; |
476 | 476 | ||
477 | send_task = GNUNET_SCHEDULER_NO_TASK; | 477 | send_task = NULL; |
478 | 478 | ||
479 | ok = 1; | 479 | ok = 1; |
480 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, | 480 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, |
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c index 07213722e..a727d3e6a 100644 --- a/src/transport/test_transport_api_reliability.c +++ b/src/transport/test_transport_api_reliability.c | |||
@@ -107,7 +107,7 @@ char *cfg_file_p2; | |||
107 | /** | 107 | /** |
108 | * Timeout task | 108 | * Timeout task |
109 | */ | 109 | */ |
110 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 110 | static struct GNUNET_SCHEDULER_Task * die_task; |
111 | 111 | ||
112 | /** | 112 | /** |
113 | * Transport transmit handle used | 113 | * Transport transmit handle used |
@@ -190,7 +190,7 @@ end () | |||
190 | "kb/s"); | 190 | "kb/s"); |
191 | GNUNET_free (value_name); | 191 | GNUNET_free (value_name); |
192 | 192 | ||
193 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 193 | if (die_task != NULL) |
194 | GNUNET_SCHEDULER_cancel (die_task); | 194 | GNUNET_SCHEDULER_cancel (die_task); |
195 | 195 | ||
196 | if (th != NULL) | 196 | if (th != NULL) |
@@ -224,7 +224,7 @@ static void | |||
224 | end_badly () | 224 | end_badly () |
225 | { | 225 | { |
226 | int i; | 226 | int i; |
227 | die_task = GNUNET_SCHEDULER_NO_TASK; | 227 | die_task = NULL; |
228 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 228 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); |
229 | 229 | ||
230 | if (test_connected == GNUNET_YES) | 230 | if (test_connected == GNUNET_YES) |
@@ -347,7 +347,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
347 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 347 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
348 | "Expected message %u of size %u, got %u bytes of message %u\n", | 348 | "Expected message %u of size %u, got %u bytes of message %u\n", |
349 | ntohl (hdr->num), s, ntohs (message->size), ntohl (hdr->num)); | 349 | ntohl (hdr->num), s, ntohs (message->size), ntohl (hdr->num)); |
350 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 350 | if (NULL != die_task) |
351 | GNUNET_SCHEDULER_cancel (die_task); | 351 | GNUNET_SCHEDULER_cancel (die_task); |
352 | test_sending = GNUNET_YES; | 352 | test_sending = GNUNET_YES; |
353 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 353 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
@@ -360,7 +360,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
360 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 360 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
361 | "Expected message %u with bits %u, but body did not match\n", | 361 | "Expected message %u with bits %u, but body did not match\n", |
362 | ntohl (hdr->num), (unsigned char) n); | 362 | ntohl (hdr->num), (unsigned char) n); |
363 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 363 | if (NULL != die_task) |
364 | GNUNET_SCHEDULER_cancel (die_task); | 364 | GNUNET_SCHEDULER_cancel (die_task); |
365 | test_sending = GNUNET_YES; | 365 | test_sending = GNUNET_YES; |
366 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 366 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
@@ -384,7 +384,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
384 | if (0 == (n % (TOTAL_MSGS / 100))) | 384 | if (0 == (n % (TOTAL_MSGS / 100))) |
385 | { | 385 | { |
386 | FPRINTF (stderr, "%s", "."); | 386 | FPRINTF (stderr, "%s", "."); |
387 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 387 | if (NULL != die_task) |
388 | GNUNET_SCHEDULER_cancel (die_task); | 388 | GNUNET_SCHEDULER_cancel (die_task); |
389 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); | 389 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); |
390 | } | 390 | } |
@@ -412,7 +412,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
412 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 412 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
413 | "Timeout occurred while waiting for transmit_ready for msg %u of %u\n", | 413 | "Timeout occurred while waiting for transmit_ready for msg %u of %u\n", |
414 | msg_scheduled, TOTAL_MSGS); | 414 | msg_scheduled, TOTAL_MSGS); |
415 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 415 | if (NULL != die_task) |
416 | GNUNET_SCHEDULER_cancel (die_task); | 416 | GNUNET_SCHEDULER_cancel (die_task); |
417 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 417 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
418 | ok = 42; | 418 | ok = 42; |
@@ -460,7 +460,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
460 | { | 460 | { |
461 | FPRINTF (stderr, "%s", "\n"); | 461 | FPRINTF (stderr, "%s", "\n"); |
462 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All messages scheduled to be sent\n"); | 462 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All messages scheduled to be sent\n"); |
463 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 463 | if (NULL != die_task) |
464 | GNUNET_SCHEDULER_cancel (die_task); | 464 | GNUNET_SCHEDULER_cancel (die_task); |
465 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); | 465 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); |
466 | } | 466 | } |
@@ -554,7 +554,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
554 | if ((p1 == NULL) || (p2 == NULL)) | 554 | if ((p1 == NULL) || (p2 == NULL)) |
555 | { | 555 | { |
556 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); | 556 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); |
557 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 557 | if (die_task != NULL) |
558 | GNUNET_SCHEDULER_cancel (die_task); | 558 | GNUNET_SCHEDULER_cancel (die_task); |
559 | //die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 559 | //die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
560 | return; | 560 | return; |
diff --git a/src/transport/test_transport_api_restart_1peer.c b/src/transport/test_transport_api_restart_1peer.c index f0d5d5660..b77d8d0df 100644 --- a/src/transport/test_transport_api_restart_1peer.c +++ b/src/transport/test_transport_api_restart_1peer.c | |||
@@ -45,11 +45,11 @@ static char *test_name; | |||
45 | 45 | ||
46 | static int ok; | 46 | static int ok; |
47 | 47 | ||
48 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 48 | static struct GNUNET_SCHEDULER_Task * die_task; |
49 | 49 | ||
50 | static GNUNET_SCHEDULER_TaskIdentifier send_task; | 50 | static struct GNUNET_SCHEDULER_Task * send_task; |
51 | 51 | ||
52 | static GNUNET_SCHEDULER_TaskIdentifier reconnect_task; | 52 | static struct GNUNET_SCHEDULER_Task * reconnect_task; |
53 | 53 | ||
54 | static struct PeerContext *p1; | 54 | static struct PeerContext *p1; |
55 | 55 | ||
@@ -77,17 +77,17 @@ end () | |||
77 | { | 77 | { |
78 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 78 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); |
79 | 79 | ||
80 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 80 | if (send_task != NULL) |
81 | GNUNET_SCHEDULER_cancel (send_task); | 81 | GNUNET_SCHEDULER_cancel (send_task); |
82 | send_task = GNUNET_SCHEDULER_NO_TASK; | 82 | send_task = NULL; |
83 | 83 | ||
84 | if (reconnect_task != GNUNET_SCHEDULER_NO_TASK) | 84 | if (reconnect_task != NULL) |
85 | GNUNET_SCHEDULER_cancel (reconnect_task); | 85 | GNUNET_SCHEDULER_cancel (reconnect_task); |
86 | reconnect_task = GNUNET_SCHEDULER_NO_TASK; | 86 | reconnect_task = NULL; |
87 | 87 | ||
88 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 88 | if (die_task != NULL) |
89 | GNUNET_SCHEDULER_cancel (die_task); | 89 | GNUNET_SCHEDULER_cancel (die_task); |
90 | die_task = GNUNET_SCHEDULER_NO_TASK; | 90 | die_task = NULL; |
91 | 91 | ||
92 | if (th != NULL) | 92 | if (th != NULL) |
93 | GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); | 93 | GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); |
@@ -102,7 +102,7 @@ end () | |||
102 | static void | 102 | static void |
103 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 103 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
104 | { | 104 | { |
105 | die_task = GNUNET_SCHEDULER_NO_TASK; | 105 | die_task = NULL; |
106 | 106 | ||
107 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 107 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); |
108 | 108 | ||
@@ -112,13 +112,13 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
112 | if (restarted == GNUNET_NO) | 112 | if (restarted == GNUNET_NO) |
113 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Peer was NOT restarted\n"); | 113 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Peer was NOT restarted\n"); |
114 | 114 | ||
115 | if (reconnect_task != GNUNET_SCHEDULER_NO_TASK) | 115 | if (reconnect_task != NULL) |
116 | GNUNET_SCHEDULER_cancel (reconnect_task); | 116 | GNUNET_SCHEDULER_cancel (reconnect_task); |
117 | reconnect_task = GNUNET_SCHEDULER_NO_TASK; | 117 | reconnect_task = NULL; |
118 | 118 | ||
119 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 119 | if (send_task != NULL) |
120 | GNUNET_SCHEDULER_cancel (send_task); | 120 | GNUNET_SCHEDULER_cancel (send_task); |
121 | send_task = GNUNET_SCHEDULER_NO_TASK; | 121 | send_task = NULL; |
122 | 122 | ||
123 | if (cc != NULL) | 123 | if (cc != NULL) |
124 | { | 124 | { |
@@ -144,7 +144,7 @@ reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
144 | { | 144 | { |
145 | struct PeerContext *p = cls; | 145 | struct PeerContext *p = cls; |
146 | 146 | ||
147 | reconnect_task = GNUNET_SCHEDULER_NO_TASK; | 147 | reconnect_task = NULL; |
148 | 148 | ||
149 | GNUNET_TRANSPORT_try_connect (p->th, &p2->id, NULL, NULL); /*FIXME TRY_CONNECT change */ | 149 | GNUNET_TRANSPORT_try_connect (p->th, &p2->id, NULL, NULL); /*FIXME TRY_CONNECT change */ |
150 | reconnect_task = | 150 | reconnect_task = |
@@ -214,7 +214,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
214 | { | 214 | { |
215 | GNUNET_break (0); | 215 | GNUNET_break (0); |
216 | ok = 1; | 216 | ok = 1; |
217 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 217 | if (die_task != NULL) |
218 | GNUNET_SCHEDULER_cancel (die_task); | 218 | GNUNET_SCHEDULER_cancel (die_task); |
219 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 219 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
220 | } | 220 | } |
@@ -233,7 +233,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
233 | { | 233 | { |
234 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 234 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
235 | "Timeout occurred while waiting for transmit_ready\n"); | 235 | "Timeout occurred while waiting for transmit_ready\n"); |
236 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 236 | if (NULL != die_task) |
237 | GNUNET_SCHEDULER_cancel (die_task); | 237 | GNUNET_SCHEDULER_cancel (die_task); |
238 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 238 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
239 | ok = 42; | 239 | ok = 42; |
@@ -262,7 +262,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
262 | static void | 262 | static void |
263 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 263 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
264 | { | 264 | { |
265 | send_task = GNUNET_SCHEDULER_NO_TASK; | 265 | send_task = NULL; |
266 | 266 | ||
267 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 267 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
268 | return; | 268 | return; |
@@ -340,9 +340,9 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
340 | if (th != NULL) | 340 | if (th != NULL) |
341 | GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); | 341 | GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); |
342 | th = NULL; | 342 | th = NULL; |
343 | if (GNUNET_SCHEDULER_NO_TASK != send_task) | 343 | if (NULL != send_task) |
344 | GNUNET_SCHEDULER_cancel (send_task); | 344 | GNUNET_SCHEDULER_cancel (send_task); |
345 | send_task = GNUNET_SCHEDULER_NO_TASK; | 345 | send_task = NULL; |
346 | } | 346 | } |
347 | 347 | ||
348 | static void | 348 | static void |
@@ -405,7 +405,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
405 | if ((p1 == NULL) || (p2 == NULL)) | 405 | if ((p1 == NULL) || (p2 == NULL)) |
406 | { | 406 | { |
407 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); | 407 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); |
408 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 408 | if (die_task != NULL) |
409 | GNUNET_SCHEDULER_cancel (die_task); | 409 | GNUNET_SCHEDULER_cancel (die_task); |
410 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 410 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
411 | return; | 411 | return; |
@@ -425,7 +425,7 @@ check () | |||
425 | GNUNET_GETOPT_OPTION_END | 425 | GNUNET_GETOPT_OPTION_END |
426 | }; | 426 | }; |
427 | 427 | ||
428 | send_task = GNUNET_SCHEDULER_NO_TASK; | 428 | send_task = NULL; |
429 | 429 | ||
430 | ok = 1; | 430 | ok = 1; |
431 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, | 431 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, |
diff --git a/src/transport/test_transport_api_restart_2peers.c b/src/transport/test_transport_api_restart_2peers.c index 3b5d63bce..25054b536 100644 --- a/src/transport/test_transport_api_restart_2peers.c +++ b/src/transport/test_transport_api_restart_2peers.c | |||
@@ -45,11 +45,11 @@ static char *test_name; | |||
45 | 45 | ||
46 | static int ok; | 46 | static int ok; |
47 | 47 | ||
48 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 48 | static struct GNUNET_SCHEDULER_Task * die_task; |
49 | 49 | ||
50 | static GNUNET_SCHEDULER_TaskIdentifier send_task; | 50 | static struct GNUNET_SCHEDULER_Task * send_task; |
51 | 51 | ||
52 | static GNUNET_SCHEDULER_TaskIdentifier reconnect_task; | 52 | static struct GNUNET_SCHEDULER_Task * reconnect_task; |
53 | 53 | ||
54 | static struct PeerContext *p1; | 54 | static struct PeerContext *p1; |
55 | 55 | ||
@@ -72,17 +72,17 @@ static void | |||
72 | end () | 72 | end () |
73 | { | 73 | { |
74 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 74 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); |
75 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 75 | if (send_task != NULL) |
76 | GNUNET_SCHEDULER_cancel (send_task); | 76 | GNUNET_SCHEDULER_cancel (send_task); |
77 | send_task = GNUNET_SCHEDULER_NO_TASK; | 77 | send_task = NULL; |
78 | 78 | ||
79 | if (reconnect_task != GNUNET_SCHEDULER_NO_TASK) | 79 | if (reconnect_task != NULL) |
80 | GNUNET_SCHEDULER_cancel (reconnect_task); | 80 | GNUNET_SCHEDULER_cancel (reconnect_task); |
81 | reconnect_task = GNUNET_SCHEDULER_NO_TASK; | 81 | reconnect_task = NULL; |
82 | 82 | ||
83 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 83 | if (die_task != NULL) |
84 | GNUNET_SCHEDULER_cancel (die_task); | 84 | GNUNET_SCHEDULER_cancel (die_task); |
85 | die_task = GNUNET_SCHEDULER_NO_TASK; | 85 | die_task = NULL; |
86 | 86 | ||
87 | if (th != NULL) | 87 | if (th != NULL) |
88 | GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); | 88 | GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); |
@@ -96,7 +96,7 @@ end () | |||
96 | static void | 96 | static void |
97 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 97 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
98 | { | 98 | { |
99 | die_task = GNUNET_SCHEDULER_NO_TASK; | 99 | die_task = NULL; |
100 | 100 | ||
101 | if (restarted == GNUNET_YES) | 101 | if (restarted == GNUNET_YES) |
102 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Peer was restarted, but communication did not resume\n"); | 102 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Peer was restarted, but communication did not resume\n"); |
@@ -104,13 +104,13 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
104 | if (restarted == GNUNET_NO) | 104 | if (restarted == GNUNET_NO) |
105 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Peer was NOT (even) restarted\n"); | 105 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Peer was NOT (even) restarted\n"); |
106 | 106 | ||
107 | if (reconnect_task != GNUNET_SCHEDULER_NO_TASK) | 107 | if (reconnect_task != NULL) |
108 | GNUNET_SCHEDULER_cancel (reconnect_task); | 108 | GNUNET_SCHEDULER_cancel (reconnect_task); |
109 | reconnect_task = GNUNET_SCHEDULER_NO_TASK; | 109 | reconnect_task = NULL; |
110 | 110 | ||
111 | if (send_task != GNUNET_SCHEDULER_NO_TASK) | 111 | if (send_task != NULL) |
112 | GNUNET_SCHEDULER_cancel (send_task); | 112 | GNUNET_SCHEDULER_cancel (send_task); |
113 | send_task = GNUNET_SCHEDULER_NO_TASK; | 113 | send_task = NULL; |
114 | 114 | ||
115 | if (cc != NULL) | 115 | if (cc != NULL) |
116 | { | 116 | { |
@@ -137,7 +137,7 @@ reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
137 | { | 137 | { |
138 | struct PeerContext *p = cls; | 138 | struct PeerContext *p = cls; |
139 | 139 | ||
140 | reconnect_task = GNUNET_SCHEDULER_NO_TASK; | 140 | reconnect_task = NULL; |
141 | GNUNET_TRANSPORT_try_connect (p1->th, &p2->id, NULL, NULL); /*FIXME TRY_CONNECT change */ | 141 | GNUNET_TRANSPORT_try_connect (p1->th, &p2->id, NULL, NULL); /*FIXME TRY_CONNECT change */ |
142 | reconnect_task = | 142 | reconnect_task = |
143 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &reconnect, p); | 143 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &reconnect, p); |
@@ -212,7 +212,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
212 | { | 212 | { |
213 | GNUNET_break (0); | 213 | GNUNET_break (0); |
214 | ok = 1; | 214 | ok = 1; |
215 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 215 | if (die_task != NULL) |
216 | GNUNET_SCHEDULER_cancel (die_task); | 216 | GNUNET_SCHEDULER_cancel (die_task); |
217 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 217 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
218 | } | 218 | } |
@@ -230,7 +230,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
230 | { | 230 | { |
231 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 231 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
232 | "Timeout occurred while waiting for transmit_ready\n"); | 232 | "Timeout occurred while waiting for transmit_ready\n"); |
233 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 233 | if (NULL != die_task) |
234 | GNUNET_SCHEDULER_cancel (die_task); | 234 | GNUNET_SCHEDULER_cancel (die_task); |
235 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 235 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
236 | ok = 42; | 236 | ok = 42; |
@@ -259,7 +259,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
259 | static void | 259 | static void |
260 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 260 | sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
261 | { | 261 | { |
262 | send_task = GNUNET_SCHEDULER_NO_TASK; | 262 | send_task = NULL; |
263 | 263 | ||
264 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 264 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
265 | return; | 265 | return; |
@@ -321,9 +321,9 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
321 | if (th != NULL) | 321 | if (th != NULL) |
322 | GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); | 322 | GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); |
323 | th = NULL; | 323 | th = NULL; |
324 | if (GNUNET_SCHEDULER_NO_TASK != send_task) | 324 | if (NULL != send_task) |
325 | GNUNET_SCHEDULER_cancel (send_task); | 325 | GNUNET_SCHEDULER_cancel (send_task); |
326 | send_task = GNUNET_SCHEDULER_NO_TASK; | 326 | send_task = NULL; |
327 | } | 327 | } |
328 | 328 | ||
329 | 329 | ||
@@ -386,7 +386,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
386 | if ((p1 == NULL) || (p2 == NULL)) | 386 | if ((p1 == NULL) || (p2 == NULL)) |
387 | { | 387 | { |
388 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); | 388 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); |
389 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 389 | if (die_task != NULL) |
390 | GNUNET_SCHEDULER_cancel (die_task); | 390 | GNUNET_SCHEDULER_cancel (die_task); |
391 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 391 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
392 | return; | 392 | return; |
@@ -406,7 +406,7 @@ check () | |||
406 | GNUNET_GETOPT_OPTION_END | 406 | GNUNET_GETOPT_OPTION_END |
407 | }; | 407 | }; |
408 | 408 | ||
409 | send_task = GNUNET_SCHEDULER_NO_TASK; | 409 | send_task = NULL; |
410 | 410 | ||
411 | ok = 1; | 411 | ok = 1; |
412 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, | 412 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name, |
diff --git a/src/transport/test_transport_api_timeout.c b/src/transport/test_transport_api_timeout.c index 01af9f81b..d243e8fbe 100644 --- a/src/transport/test_transport_api_timeout.c +++ b/src/transport/test_transport_api_timeout.c | |||
@@ -48,9 +48,9 @@ static char *test_name; | |||
48 | 48 | ||
49 | static int ok; | 49 | static int ok; |
50 | 50 | ||
51 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 51 | static struct GNUNET_SCHEDULER_Task * die_task; |
52 | 52 | ||
53 | static GNUNET_SCHEDULER_TaskIdentifier timer_task; | 53 | static struct GNUNET_SCHEDULER_Task * timer_task; |
54 | 54 | ||
55 | static struct GNUNET_TRANSPORT_TESTING_handle *tth; | 55 | static struct GNUNET_TRANSPORT_TESTING_handle *tth; |
56 | 56 | ||
@@ -85,16 +85,16 @@ end () | |||
85 | { | 85 | { |
86 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 86 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); |
87 | 87 | ||
88 | if (timer_task != GNUNET_SCHEDULER_NO_TASK) | 88 | if (timer_task != NULL) |
89 | { | 89 | { |
90 | GNUNET_SCHEDULER_cancel (timer_task); | 90 | GNUNET_SCHEDULER_cancel (timer_task); |
91 | timer_task = GNUNET_SCHEDULER_NO_TASK; | 91 | timer_task = NULL; |
92 | } | 92 | } |
93 | 93 | ||
94 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 94 | if (die_task != NULL) |
95 | { | 95 | { |
96 | GNUNET_SCHEDULER_cancel (die_task); | 96 | GNUNET_SCHEDULER_cancel (die_task); |
97 | die_task = GNUNET_SCHEDULER_NO_TASK; | 97 | die_task = NULL; |
98 | } | 98 | } |
99 | 99 | ||
100 | if (th != NULL) | 100 | if (th != NULL) |
@@ -123,14 +123,14 @@ end () | |||
123 | static void | 123 | static void |
124 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 124 | end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
125 | { | 125 | { |
126 | die_task = GNUNET_SCHEDULER_NO_TASK; | 126 | die_task = NULL; |
127 | 127 | ||
128 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 128 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); |
129 | 129 | ||
130 | if (timer_task != GNUNET_SCHEDULER_NO_TASK) | 130 | if (timer_task != NULL) |
131 | { | 131 | { |
132 | GNUNET_SCHEDULER_cancel (timer_task); | 132 | GNUNET_SCHEDULER_cancel (timer_task); |
133 | timer_task = GNUNET_SCHEDULER_NO_TASK; | 133 | timer_task = NULL; |
134 | } | 134 | } |
135 | if (cc != NULL) | 135 | if (cc != NULL) |
136 | GNUNET_TRANSPORT_TESTING_connect_peers_cancel (tth, cc); | 136 | GNUNET_TRANSPORT_TESTING_connect_peers_cancel (tth, cc); |
@@ -185,7 +185,7 @@ timer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
185 | { | 185 | { |
186 | static int percentage; | 186 | static int percentage; |
187 | 187 | ||
188 | timer_task = GNUNET_SCHEDULER_NO_TASK; | 188 | timer_task = NULL; |
189 | 189 | ||
190 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 190 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
191 | return; | 191 | return; |
@@ -228,7 +228,7 @@ testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) | |||
228 | GNUNET_STRINGS_relative_time_to_string (WAIT, | 228 | GNUNET_STRINGS_relative_time_to_string (WAIT, |
229 | GNUNET_YES)); | 229 | GNUNET_YES)); |
230 | 230 | ||
231 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 231 | if (die_task != NULL) |
232 | GNUNET_SCHEDULER_cancel (die_task); | 232 | GNUNET_SCHEDULER_cancel (die_task); |
233 | die_task = GNUNET_SCHEDULER_add_delayed (WAIT, &end_badly, NULL); | 233 | die_task = GNUNET_SCHEDULER_add_delayed (WAIT, &end_badly, NULL); |
234 | 234 | ||
@@ -279,7 +279,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
279 | if ((p1 == NULL) || (p2 == NULL)) | 279 | if ((p1 == NULL) || (p2 == NULL)) |
280 | { | 280 | { |
281 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); | 281 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); |
282 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 282 | if (die_task != NULL) |
283 | GNUNET_SCHEDULER_cancel (die_task); | 283 | GNUNET_SCHEDULER_cancel (die_task); |
284 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 284 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
285 | return; | 285 | return; |
@@ -298,7 +298,7 @@ check () | |||
298 | GNUNET_GETOPT_OPTION_END | 298 | GNUNET_GETOPT_OPTION_END |
299 | }; | 299 | }; |
300 | 300 | ||
301 | timer_task = GNUNET_SCHEDULER_NO_TASK; | 301 | timer_task = NULL; |
302 | 302 | ||
303 | ok = 1; | 303 | ok = 1; |
304 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, | 304 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, |
diff --git a/src/transport/test_transport_api_unreliability_constant.c b/src/transport/test_transport_api_unreliability_constant.c index 2ff1e4b0c..c859e802e 100644 --- a/src/transport/test_transport_api_unreliability_constant.c +++ b/src/transport/test_transport_api_unreliability_constant.c | |||
@@ -49,7 +49,7 @@ static char *test_name; | |||
49 | 49 | ||
50 | static int ok; | 50 | static int ok; |
51 | 51 | ||
52 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 52 | static struct GNUNET_SCHEDULER_Task * die_task; |
53 | 53 | ||
54 | struct PeerContext *p1; | 54 | struct PeerContext *p1; |
55 | 55 | ||
@@ -134,7 +134,7 @@ end () | |||
134 | "kb/s"); | 134 | "kb/s"); |
135 | GNUNET_free (value_name); | 135 | GNUNET_free (value_name); |
136 | 136 | ||
137 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 137 | if (die_task != NULL) |
138 | GNUNET_SCHEDULER_cancel (die_task); | 138 | GNUNET_SCHEDULER_cancel (die_task); |
139 | 139 | ||
140 | if (th != NULL) | 140 | if (th != NULL) |
@@ -160,7 +160,7 @@ end () | |||
160 | static void | 160 | static void |
161 | end_badly () | 161 | end_badly () |
162 | { | 162 | { |
163 | die_task = GNUNET_SCHEDULER_NO_TASK; | 163 | die_task = NULL; |
164 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 164 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); |
165 | 165 | ||
166 | if (test_failed == GNUNET_NO) | 166 | if (test_failed == GNUNET_NO) |
@@ -223,7 +223,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
223 | { | 223 | { |
224 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Expected message no %u, got %u\n", | 224 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Expected message no %u, got %u\n", |
225 | msg_recv_expected, msg_recv); | 225 | msg_recv_expected, msg_recv); |
226 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 226 | if (NULL != die_task) |
227 | GNUNET_SCHEDULER_cancel (die_task); | 227 | GNUNET_SCHEDULER_cancel (die_task); |
228 | test_failed = GNUNET_YES; | 228 | test_failed = GNUNET_YES; |
229 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 229 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
@@ -236,7 +236,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
236 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 236 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
237 | "Expected message %u of size %u, got %u bytes of message %u\n", | 237 | "Expected message %u of size %u, got %u bytes of message %u\n", |
238 | ntohl (hdr->num), s, ntohs (message->size), ntohl (hdr->num)); | 238 | ntohl (hdr->num), s, ntohs (message->size), ntohl (hdr->num)); |
239 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 239 | if (NULL != die_task) |
240 | GNUNET_SCHEDULER_cancel (die_task); | 240 | GNUNET_SCHEDULER_cancel (die_task); |
241 | test_failed = GNUNET_YES; | 241 | test_failed = GNUNET_YES; |
242 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 242 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
@@ -249,7 +249,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
249 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 249 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
250 | "Expected message %u with bits %u, but body did not match\n", | 250 | "Expected message %u with bits %u, but body did not match\n", |
251 | ntohl (hdr->num), (unsigned char) n); | 251 | ntohl (hdr->num), (unsigned char) n); |
252 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 252 | if (NULL != die_task) |
253 | GNUNET_SCHEDULER_cancel (die_task); | 253 | GNUNET_SCHEDULER_cancel (die_task); |
254 | test_failed = GNUNET_YES; | 254 | test_failed = GNUNET_YES; |
255 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 255 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
@@ -266,7 +266,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
266 | if (0 == (n % (TOTAL_MSGS / 100))) | 266 | if (0 == (n % (TOTAL_MSGS / 100))) |
267 | { | 267 | { |
268 | FPRINTF (stderr, "%s", "."); | 268 | FPRINTF (stderr, "%s", "."); |
269 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 269 | if (NULL != die_task) |
270 | GNUNET_SCHEDULER_cancel (die_task); | 270 | GNUNET_SCHEDULER_cancel (die_task); |
271 | test_failed = GNUNET_YES; | 271 | test_failed = GNUNET_YES; |
272 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); | 272 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); |
@@ -296,7 +296,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
296 | { | 296 | { |
297 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 297 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
298 | "Timeout occurred while waiting for transmit_ready\n"); | 298 | "Timeout occurred while waiting for transmit_ready\n"); |
299 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 299 | if (NULL != die_task) |
300 | GNUNET_SCHEDULER_cancel (die_task); | 300 | GNUNET_SCHEDULER_cancel (die_task); |
301 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 301 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
302 | ok = 42; | 302 | ok = 42; |
@@ -343,7 +343,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
343 | FPRINTF (stderr, "%s", "\n"); | 343 | FPRINTF (stderr, "%s", "\n"); |
344 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 344 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
345 | "All messages scheduled to be sent!!\n"); | 345 | "All messages scheduled to be sent!!\n"); |
346 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 346 | if (NULL != die_task) |
347 | GNUNET_SCHEDULER_cancel (die_task); | 347 | GNUNET_SCHEDULER_cancel (die_task); |
348 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); | 348 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); |
349 | } | 349 | } |
@@ -434,7 +434,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
434 | if ((p1 == NULL) || (p2 == NULL)) | 434 | if ((p1 == NULL) || (p2 == NULL)) |
435 | { | 435 | { |
436 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); | 436 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Fail! Could not start peers!\n"); |
437 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 437 | if (die_task != NULL) |
438 | GNUNET_SCHEDULER_cancel (die_task); | 438 | GNUNET_SCHEDULER_cancel (die_task); |
439 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 439 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
440 | return; | 440 | return; |
diff --git a/src/transport/test_transport_blacklisting.c b/src/transport/test_transport_blacklisting.c index fff27b69f..a14944a14 100644 --- a/src/transport/test_transport_blacklisting.c +++ b/src/transport/test_transport_blacklisting.c | |||
@@ -73,11 +73,11 @@ static int stage; | |||
73 | static int ok; | 73 | static int ok; |
74 | static int connected; | 74 | static int connected; |
75 | 75 | ||
76 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 76 | static struct GNUNET_SCHEDULER_Task * die_task; |
77 | 77 | ||
78 | static GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 78 | static struct GNUNET_SCHEDULER_Task * timeout_task; |
79 | 79 | ||
80 | static GNUNET_SCHEDULER_TaskIdentifier stage_task; | 80 | static struct GNUNET_SCHEDULER_Task * stage_task; |
81 | 81 | ||
82 | #if VERBOSE | 82 | #if VERBOSE |
83 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 83 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
@@ -93,22 +93,22 @@ end(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
93 | { | 93 | { |
94 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Stopping\n"); | 94 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Stopping\n"); |
95 | 95 | ||
96 | if (die_task != GNUNET_SCHEDULER_NO_TASK ) | 96 | if (die_task != NULL ) |
97 | { | 97 | { |
98 | GNUNET_SCHEDULER_cancel (die_task); | 98 | GNUNET_SCHEDULER_cancel (die_task); |
99 | die_task = GNUNET_SCHEDULER_NO_TASK; | 99 | die_task = NULL; |
100 | } | 100 | } |
101 | 101 | ||
102 | if (timeout_task != GNUNET_SCHEDULER_NO_TASK ) | 102 | if (timeout_task != NULL ) |
103 | { | 103 | { |
104 | GNUNET_SCHEDULER_cancel (timeout_task); | 104 | GNUNET_SCHEDULER_cancel (timeout_task); |
105 | timeout_task = GNUNET_SCHEDULER_NO_TASK; | 105 | timeout_task = NULL; |
106 | } | 106 | } |
107 | 107 | ||
108 | if (stage_task != GNUNET_SCHEDULER_NO_TASK ) | 108 | if (stage_task != NULL ) |
109 | { | 109 | { |
110 | GNUNET_SCHEDULER_cancel (stage_task); | 110 | GNUNET_SCHEDULER_cancel (stage_task); |
111 | stage_task = GNUNET_SCHEDULER_NO_TASK; | 111 | stage_task = NULL; |
112 | } | 112 | } |
113 | 113 | ||
114 | if (cc != NULL ) | 114 | if (cc != NULL ) |
@@ -132,18 +132,18 @@ end(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
132 | static void | 132 | static void |
133 | end_badly(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 133 | end_badly(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
134 | { | 134 | { |
135 | die_task = GNUNET_SCHEDULER_NO_TASK; | 135 | die_task = NULL; |
136 | 136 | ||
137 | if (timeout_task != GNUNET_SCHEDULER_NO_TASK ) | 137 | if (timeout_task != NULL ) |
138 | { | 138 | { |
139 | GNUNET_SCHEDULER_cancel (timeout_task); | 139 | GNUNET_SCHEDULER_cancel (timeout_task); |
140 | timeout_task = GNUNET_SCHEDULER_NO_TASK; | 140 | timeout_task = NULL; |
141 | } | 141 | } |
142 | 142 | ||
143 | if (stage_task != GNUNET_SCHEDULER_NO_TASK ) | 143 | if (stage_task != NULL ) |
144 | { | 144 | { |
145 | GNUNET_SCHEDULER_cancel (stage_task); | 145 | GNUNET_SCHEDULER_cancel (stage_task); |
146 | stage_task = GNUNET_SCHEDULER_NO_TASK; | 146 | stage_task = NULL; |
147 | } | 147 | } |
148 | 148 | ||
149 | if (cc != NULL ) | 149 | if (cc != NULL ) |
@@ -176,7 +176,7 @@ static void | |||
176 | connect_timeout(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 176 | connect_timeout(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
177 | { | 177 | { |
178 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Peers not connected, next stage\n"); | 178 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Peers not connected, next stage\n"); |
179 | timeout_task = GNUNET_SCHEDULER_NO_TASK; | 179 | timeout_task = NULL; |
180 | stage_task = GNUNET_SCHEDULER_add_now (&run_stage, NULL ); | 180 | stage_task = GNUNET_SCHEDULER_add_now (&run_stage, NULL ); |
181 | } | 181 | } |
182 | 182 | ||
@@ -246,8 +246,8 @@ static int check_blacklist_config (char *cfg_file, | |||
246 | static void | 246 | static void |
247 | run_stage(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 247 | run_stage(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
248 | { | 248 | { |
249 | stage_task = GNUNET_SCHEDULER_NO_TASK; | 249 | stage_task = NULL; |
250 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 250 | if (NULL != die_task) |
251 | GNUNET_SCHEDULER_cancel (die_task); | 251 | GNUNET_SCHEDULER_cancel (die_task); |
252 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL ); | 252 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL ); |
253 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Running stage %u\n", stage); | 253 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Running stage %u\n", stage); |
diff --git a/src/transport/test_transport_startonly.c b/src/transport/test_transport_startonly.c index 2deb3f58b..78ed825ac 100644 --- a/src/transport/test_transport_startonly.c +++ b/src/transport/test_transport_startonly.c | |||
@@ -37,7 +37,7 @@ | |||
37 | 37 | ||
38 | #define ITERATIONS 10 | 38 | #define ITERATIONS 10 |
39 | 39 | ||
40 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 40 | struct GNUNET_SCHEDULER_Task * timeout_task; |
41 | 41 | ||
42 | static struct PeerContext *p1; | 42 | static struct PeerContext *p1; |
43 | 43 | ||
@@ -54,10 +54,10 @@ end () | |||
54 | { | 54 | { |
55 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 55 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); |
56 | 56 | ||
57 | if (timeout_task != GNUNET_SCHEDULER_NO_TASK) | 57 | if (timeout_task != NULL) |
58 | { | 58 | { |
59 | GNUNET_SCHEDULER_cancel (timeout_task); | 59 | GNUNET_SCHEDULER_cancel (timeout_task); |
60 | timeout_task = GNUNET_SCHEDULER_NO_TASK; | 60 | timeout_task = NULL; |
61 | } | 61 | } |
62 | GNUNET_TRANSPORT_TESTING_done (tth); | 62 | GNUNET_TRANSPORT_TESTING_done (tth); |
63 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Exiting\n"); | 63 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Exiting\n"); |
@@ -68,7 +68,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
68 | { | 68 | { |
69 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 69 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); |
70 | 70 | ||
71 | timeout_task = GNUNET_SCHEDULER_NO_TASK; | 71 | timeout_task = NULL; |
72 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 72 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
73 | return; | 73 | return; |
74 | 74 | ||
diff --git a/src/transport/test_transport_testing.c b/src/transport/test_transport_testing.c index 747168b17..fb5bf6068 100644 --- a/src/transport/test_transport_testing.c +++ b/src/transport/test_transport_testing.c | |||
@@ -34,7 +34,7 @@ | |||
34 | */ | 34 | */ |
35 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) | 35 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) |
36 | 36 | ||
37 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 37 | struct GNUNET_SCHEDULER_Task * timeout_task; |
38 | 38 | ||
39 | static struct PeerContext *p1; | 39 | static struct PeerContext *p1; |
40 | static struct PeerContext *p2; | 40 | static struct PeerContext *p2; |
@@ -52,7 +52,7 @@ end () | |||
52 | { | 52 | { |
53 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 53 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); |
54 | 54 | ||
55 | if (timeout_task != GNUNET_SCHEDULER_NO_TASK) | 55 | if (timeout_task != NULL) |
56 | GNUNET_SCHEDULER_cancel (timeout_task); | 56 | GNUNET_SCHEDULER_cancel (timeout_task); |
57 | 57 | ||
58 | GNUNET_TRANSPORT_TESTING_stop_peer (tth, p1); | 58 | GNUNET_TRANSPORT_TESTING_stop_peer (tth, p1); |
@@ -64,7 +64,7 @@ end () | |||
64 | static void | 64 | static void |
65 | end_badly () | 65 | end_badly () |
66 | { | 66 | { |
67 | timeout_task = GNUNET_SCHEDULER_NO_TASK; | 67 | timeout_task = NULL; |
68 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 68 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); |
69 | 69 | ||
70 | if (NULL != cc) | 70 | if (NULL != cc) |
@@ -167,7 +167,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
167 | { | 167 | { |
168 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 168 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
169 | "Peer1 was not started successfully\n"); | 169 | "Peer1 was not started successfully\n"); |
170 | if (timeout_task != GNUNET_SCHEDULER_NO_TASK) | 170 | if (timeout_task != NULL) |
171 | GNUNET_SCHEDULER_cancel (timeout_task); | 171 | GNUNET_SCHEDULER_cancel (timeout_task); |
172 | timeout_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 172 | timeout_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
173 | } | 173 | } |
@@ -175,7 +175,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
175 | { | 175 | { |
176 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 176 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
177 | "Peer2 was not started successfully\n"); | 177 | "Peer2 was not started successfully\n"); |
178 | if (timeout_task != GNUNET_SCHEDULER_NO_TASK) | 178 | if (timeout_task != NULL) |
179 | GNUNET_SCHEDULER_cancel (timeout_task); | 179 | GNUNET_SCHEDULER_cancel (timeout_task); |
180 | timeout_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 180 | timeout_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
181 | } | 181 | } |
diff --git a/src/transport/test_transport_testing_restart.c b/src/transport/test_transport_testing_restart.c index 8ca18f982..8a238cbd5 100644 --- a/src/transport/test_transport_testing_restart.c +++ b/src/transport/test_transport_testing_restart.c | |||
@@ -32,7 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) | 33 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) |
34 | 34 | ||
35 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 35 | struct GNUNET_SCHEDULER_Task * timeout_task; |
36 | 36 | ||
37 | static struct PeerContext *p; | 37 | static struct PeerContext *p; |
38 | 38 | ||
@@ -45,7 +45,7 @@ end () | |||
45 | { | 45 | { |
46 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 46 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); |
47 | 47 | ||
48 | if (timeout_task != GNUNET_SCHEDULER_NO_TASK) | 48 | if (timeout_task != NULL) |
49 | GNUNET_SCHEDULER_cancel (timeout_task); | 49 | GNUNET_SCHEDULER_cancel (timeout_task); |
50 | 50 | ||
51 | GNUNET_TRANSPORT_TESTING_stop_peer (tth, p); | 51 | GNUNET_TRANSPORT_TESTING_stop_peer (tth, p); |
@@ -55,7 +55,7 @@ end () | |||
55 | static void | 55 | static void |
56 | end_badly () | 56 | end_badly () |
57 | { | 57 | { |
58 | timeout_task = GNUNET_SCHEDULER_NO_TASK; | 58 | timeout_task = NULL; |
59 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 59 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); |
60 | 60 | ||
61 | if (NULL != p) | 61 | if (NULL != p) |
@@ -119,7 +119,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
119 | if (NULL == p) | 119 | if (NULL == p) |
120 | { | 120 | { |
121 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Failed to start peer\n"); | 121 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Failed to start peer\n"); |
122 | if (timeout_task != GNUNET_SCHEDULER_NO_TASK) | 122 | if (timeout_task != NULL) |
123 | GNUNET_SCHEDULER_cancel (timeout_task); | 123 | GNUNET_SCHEDULER_cancel (timeout_task); |
124 | timeout_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 124 | timeout_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
125 | } | 125 | } |
diff --git a/src/transport/test_transport_testing_startstop.c b/src/transport/test_transport_testing_startstop.c index 22a4e5148..736c635e1 100644 --- a/src/transport/test_transport_testing_startstop.c +++ b/src/transport/test_transport_testing_startstop.c | |||
@@ -32,7 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) | 33 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) |
34 | 34 | ||
35 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 35 | struct GNUNET_SCHEDULER_Task * timeout_task; |
36 | 36 | ||
37 | static struct PeerContext *p; | 37 | static struct PeerContext *p; |
38 | 38 | ||
@@ -45,7 +45,7 @@ end () | |||
45 | { | 45 | { |
46 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 46 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); |
47 | 47 | ||
48 | if (timeout_task != GNUNET_SCHEDULER_NO_TASK) | 48 | if (timeout_task != NULL) |
49 | GNUNET_SCHEDULER_cancel (timeout_task); | 49 | GNUNET_SCHEDULER_cancel (timeout_task); |
50 | 50 | ||
51 | GNUNET_TRANSPORT_TESTING_stop_peer (tth, p); | 51 | GNUNET_TRANSPORT_TESTING_stop_peer (tth, p); |
@@ -55,7 +55,7 @@ end () | |||
55 | static void | 55 | static void |
56 | end_badly () | 56 | end_badly () |
57 | { | 57 | { |
58 | timeout_task = GNUNET_SCHEDULER_NO_TASK; | 58 | timeout_task = NULL; |
59 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); | 59 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n"); |
60 | 60 | ||
61 | if (NULL != p) | 61 | if (NULL != p) |
@@ -100,7 +100,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
100 | if (NULL == p) | 100 | if (NULL == p) |
101 | { | 101 | { |
102 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Failed to start peer\n"); | 102 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Failed to start peer\n"); |
103 | if (timeout_task != GNUNET_SCHEDULER_NO_TASK) | 103 | if (timeout_task != NULL) |
104 | GNUNET_SCHEDULER_cancel (timeout_task); | 104 | GNUNET_SCHEDULER_cancel (timeout_task); |
105 | timeout_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); | 105 | timeout_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL); |
106 | } | 106 | } |
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c index d25d3f4b7..517daf82a 100644 --- a/src/transport/transport-testing.c +++ b/src/transport/transport-testing.c | |||
@@ -193,7 +193,7 @@ try_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
193 | struct PeerContext *p1 = cc->p1; | 193 | struct PeerContext *p1 = cc->p1; |
194 | struct PeerContext *p2 = cc->p2; | 194 | struct PeerContext *p2 = cc->p2; |
195 | 195 | ||
196 | cc->tct = GNUNET_SCHEDULER_NO_TASK; | 196 | cc->tct = NULL; |
197 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 197 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
198 | return; | 198 | return; |
199 | 199 | ||
@@ -534,9 +534,9 @@ GNUNET_TRANSPORT_TESTING_connect_peers_cancel (struct | |||
534 | "Canceling connect request %p!\n", | 534 | "Canceling connect request %p!\n", |
535 | cc); | 535 | cc); |
536 | 536 | ||
537 | if (cc->tct != GNUNET_SCHEDULER_NO_TASK) | 537 | if (cc->tct != NULL) |
538 | GNUNET_SCHEDULER_cancel (cc->tct); | 538 | GNUNET_SCHEDULER_cancel (cc->tct); |
539 | cc->tct = GNUNET_SCHEDULER_NO_TASK; | 539 | cc->tct = NULL; |
540 | 540 | ||
541 | GNUNET_CONTAINER_DLL_remove (tth->cc_head, tth->cc_tail, cc); | 541 | GNUNET_CONTAINER_DLL_remove (tth->cc_head, tth->cc_tail, cc); |
542 | GNUNET_free (cc); | 542 | GNUNET_free (cc); |
diff --git a/src/transport/transport-testing.h b/src/transport/transport-testing.h index 99225936a..a010733e7 100644 --- a/src/transport/transport-testing.h +++ b/src/transport/transport-testing.h | |||
@@ -153,7 +153,7 @@ struct ConnectingContext | |||
153 | struct ConnectingContext *prev; | 153 | struct ConnectingContext *prev; |
154 | struct PeerContext *p1; | 154 | struct PeerContext *p1; |
155 | struct PeerContext *p2; | 155 | struct PeerContext *p2; |
156 | GNUNET_SCHEDULER_TaskIdentifier tct; | 156 | struct GNUNET_SCHEDULER_Task * tct; |
157 | GNUNET_TRANSPORT_TESTING_connect_cb cb; | 157 | GNUNET_TRANSPORT_TESTING_connect_cb cb; |
158 | void *cb_cls; | 158 | void *cb_cls; |
159 | struct GNUNET_TRANSPORT_Handle *th_p1; | 159 | struct GNUNET_TRANSPORT_Handle *th_p1; |
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index 7fa035c06..fd352a1e5 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c | |||
@@ -84,7 +84,7 @@ struct GNUNET_TRANSPORT_TransmitHandle | |||
84 | * Task to trigger request timeout if the request is stalled due to | 84 | * Task to trigger request timeout if the request is stalled due to |
85 | * congestion. | 85 | * congestion. |
86 | */ | 86 | */ |
87 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 87 | struct GNUNET_SCHEDULER_Task * timeout_task; |
88 | 88 | ||
89 | /** | 89 | /** |
90 | * How many bytes is our notify callback waiting for? | 90 | * How many bytes is our notify callback waiting for? |
@@ -171,7 +171,7 @@ struct GNUNET_TRANSPORT_GetHelloHandle | |||
171 | /** | 171 | /** |
172 | * Task for calling the HelloUpdateCallback when we already have a HELLO | 172 | * Task for calling the HelloUpdateCallback when we already have a HELLO |
173 | */ | 173 | */ |
174 | GNUNET_SCHEDULER_TaskIdentifier notify_task; | 174 | struct GNUNET_SCHEDULER_Task * notify_task; |
175 | 175 | ||
176 | /** | 176 | /** |
177 | * Closure for @e rec. | 177 | * Closure for @e rec. |
@@ -295,7 +295,7 @@ struct GNUNET_TRANSPORT_OfferHelloHandle | |||
295 | /** | 295 | /** |
296 | * Function to call once we are done. | 296 | * Function to call once we are done. |
297 | */ | 297 | */ |
298 | GNUNET_SCHEDULER_Task cont; | 298 | GNUNET_SCHEDULER_TaskCallback cont; |
299 | 299 | ||
300 | /** | 300 | /** |
301 | * Closure for @e cont | 301 | * Closure for @e cont |
@@ -434,7 +434,7 @@ struct GNUNET_TRANSPORT_Handle | |||
434 | /** | 434 | /** |
435 | * ID of the task trying to reconnect to the service. | 435 | * ID of the task trying to reconnect to the service. |
436 | */ | 436 | */ |
437 | GNUNET_SCHEDULER_TaskIdentifier reconnect_task; | 437 | struct GNUNET_SCHEDULER_Task * reconnect_task; |
438 | 438 | ||
439 | /** | 439 | /** |
440 | * ID of the task trying to trigger transmission for a peer while | 440 | * ID of the task trying to trigger transmission for a peer while |
@@ -442,7 +442,7 @@ struct GNUNET_TRANSPORT_Handle | |||
442 | * messages and the smallest entry in the 'ready_heap' has a time | 442 | * messages and the smallest entry in the 'ready_heap' has a time |
443 | * stamp in the future. | 443 | * stamp in the future. |
444 | */ | 444 | */ |
445 | GNUNET_SCHEDULER_TaskIdentifier quota_task; | 445 | struct GNUNET_SCHEDULER_Task * quota_task; |
446 | 446 | ||
447 | /** | 447 | /** |
448 | * Delay until we try to reconnect. | 448 | * Delay until we try to reconnect. |
@@ -754,9 +754,9 @@ demultiplexer (void *cls, | |||
754 | n->is_ready = GNUNET_YES; | 754 | n->is_ready = GNUNET_YES; |
755 | if ((NULL != n->th) && (NULL == n->hn)) | 755 | if ((NULL != n->th) && (NULL == n->hn)) |
756 | { | 756 | { |
757 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != n->th->timeout_task); | 757 | GNUNET_assert (NULL != n->th->timeout_task); |
758 | GNUNET_SCHEDULER_cancel (n->th->timeout_task); | 758 | GNUNET_SCHEDULER_cancel (n->th->timeout_task); |
759 | n->th->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 759 | n->th->timeout_task = NULL; |
760 | /* we've been waiting for this (congestion, not quota, | 760 | /* we've been waiting for this (congestion, not quota, |
761 | * caused delayed transmission) */ | 761 | * caused delayed transmission) */ |
762 | n->hn = GNUNET_CONTAINER_heap_insert (h->ready_heap, n, 0); | 762 | n->hn = GNUNET_CONTAINER_heap_insert (h->ready_heap, n, 0); |
@@ -835,7 +835,7 @@ timeout_request_due_to_congestion (void *cls, | |||
835 | struct GNUNET_TRANSPORT_TransmitHandle *th = cls; | 835 | struct GNUNET_TRANSPORT_TransmitHandle *th = cls; |
836 | struct Neighbour *n = th->neighbour; | 836 | struct Neighbour *n = th->neighbour; |
837 | 837 | ||
838 | n->th->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 838 | n->th->timeout_task = NULL; |
839 | GNUNET_assert (th == n->th); | 839 | GNUNET_assert (th == n->th); |
840 | GNUNET_assert (NULL == n->hn); | 840 | GNUNET_assert (NULL == n->hn); |
841 | n->th = NULL; | 841 | n->th = NULL; |
@@ -897,7 +897,7 @@ transport_notify_ready (void *cls, size_t size, void *buf) | |||
897 | /* peer not ready, wait for notification! */ | 897 | /* peer not ready, wait for notification! */ |
898 | GNUNET_assert (n == GNUNET_CONTAINER_heap_remove_root (h->ready_heap)); | 898 | GNUNET_assert (n == GNUNET_CONTAINER_heap_remove_root (h->ready_heap)); |
899 | n->hn = NULL; | 899 | n->hn = NULL; |
900 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == n->th->timeout_task); | 900 | GNUNET_assert (NULL == n->th->timeout_task); |
901 | n->th->timeout_task = | 901 | n->th->timeout_task = |
902 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining | 902 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining |
903 | (n->th->timeout), | 903 | (n->th->timeout), |
@@ -963,7 +963,7 @@ schedule_transmission_task (void *cls, | |||
963 | struct GNUNET_TRANSPORT_TransmitHandle *th; | 963 | struct GNUNET_TRANSPORT_TransmitHandle *th; |
964 | struct Neighbour *n; | 964 | struct Neighbour *n; |
965 | 965 | ||
966 | h->quota_task = GNUNET_SCHEDULER_NO_TASK; | 966 | h->quota_task = NULL; |
967 | GNUNET_assert (NULL != h->client); | 967 | GNUNET_assert (NULL != h->client); |
968 | /* destroy all requests that have timed out */ | 968 | /* destroy all requests that have timed out */ |
969 | while ((NULL != (n = GNUNET_CONTAINER_heap_peek (h->ready_heap))) && | 969 | while ((NULL != (n = GNUNET_CONTAINER_heap_peek (h->ready_heap))) && |
@@ -1018,10 +1018,10 @@ schedule_transmission (struct GNUNET_TRANSPORT_Handle *h) | |||
1018 | struct Neighbour *n; | 1018 | struct Neighbour *n; |
1019 | 1019 | ||
1020 | GNUNET_assert (NULL != h->client); | 1020 | GNUNET_assert (NULL != h->client); |
1021 | if (h->quota_task != GNUNET_SCHEDULER_NO_TASK) | 1021 | if (h->quota_task != NULL) |
1022 | { | 1022 | { |
1023 | GNUNET_SCHEDULER_cancel (h->quota_task); | 1023 | GNUNET_SCHEDULER_cancel (h->quota_task); |
1024 | h->quota_task = GNUNET_SCHEDULER_NO_TASK; | 1024 | h->quota_task = NULL; |
1025 | } | 1025 | } |
1026 | if (NULL != h->control_head) | 1026 | if (NULL != h->control_head) |
1027 | delay = GNUNET_TIME_UNIT_ZERO; | 1027 | delay = GNUNET_TIME_UNIT_ZERO; |
@@ -1127,7 +1127,7 @@ reconnect (void *cls, | |||
1127 | { | 1127 | { |
1128 | struct GNUNET_TRANSPORT_Handle *h = cls; | 1128 | struct GNUNET_TRANSPORT_Handle *h = cls; |
1129 | 1129 | ||
1130 | h->reconnect_task = GNUNET_SCHEDULER_NO_TASK; | 1130 | h->reconnect_task = NULL; |
1131 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1131 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1132 | { | 1132 | { |
1133 | /* shutdown, just give up */ | 1133 | /* shutdown, just give up */ |
@@ -1158,7 +1158,7 @@ disconnect_and_schedule_reconnect (struct GNUNET_TRANSPORT_Handle *h) | |||
1158 | { | 1158 | { |
1159 | struct GNUNET_TRANSPORT_TransmitHandle *th; | 1159 | struct GNUNET_TRANSPORT_TransmitHandle *th; |
1160 | 1160 | ||
1161 | GNUNET_assert (h->reconnect_task == GNUNET_SCHEDULER_NO_TASK); | 1161 | GNUNET_assert (h->reconnect_task == NULL); |
1162 | if (NULL != h->cth) | 1162 | if (NULL != h->cth) |
1163 | { | 1163 | { |
1164 | GNUNET_CLIENT_notify_transmit_ready_cancel (h->cth); | 1164 | GNUNET_CLIENT_notify_transmit_ready_cancel (h->cth); |
@@ -1174,10 +1174,10 @@ disconnect_and_schedule_reconnect (struct GNUNET_TRANSPORT_Handle *h) | |||
1174 | /* Forget about all neighbours that we used to be connected to */ | 1174 | /* Forget about all neighbours that we used to be connected to */ |
1175 | GNUNET_CONTAINER_multipeermap_iterate (h->neighbours, | 1175 | GNUNET_CONTAINER_multipeermap_iterate (h->neighbours, |
1176 | &neighbour_delete, h); | 1176 | &neighbour_delete, h); |
1177 | if (h->quota_task != GNUNET_SCHEDULER_NO_TASK) | 1177 | if (h->quota_task != NULL) |
1178 | { | 1178 | { |
1179 | GNUNET_SCHEDULER_cancel (h->quota_task); | 1179 | GNUNET_SCHEDULER_cancel (h->quota_task); |
1180 | h->quota_task = GNUNET_SCHEDULER_NO_TASK; | 1180 | h->quota_task = NULL; |
1181 | } | 1181 | } |
1182 | while ((NULL != (th = h->control_head))) | 1182 | while ((NULL != (th = h->control_head))) |
1183 | { | 1183 | { |
@@ -1577,7 +1577,7 @@ GNUNET_TRANSPORT_set_traffic_metric (struct GNUNET_TRANSPORT_Handle *handle, | |||
1577 | struct GNUNET_TRANSPORT_OfferHelloHandle * | 1577 | struct GNUNET_TRANSPORT_OfferHelloHandle * |
1578 | GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle, | 1578 | GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle, |
1579 | const struct GNUNET_MessageHeader *hello, | 1579 | const struct GNUNET_MessageHeader *hello, |
1580 | GNUNET_SCHEDULER_Task cont, void *cls) | 1580 | GNUNET_SCHEDULER_TaskCallback cont, void *cls) |
1581 | { | 1581 | { |
1582 | struct GNUNET_TRANSPORT_OfferHelloHandle *ohh; | 1582 | struct GNUNET_TRANSPORT_OfferHelloHandle *ohh; |
1583 | struct GNUNET_MessageHeader *msg; | 1583 | struct GNUNET_MessageHeader *msg; |
@@ -1663,8 +1663,8 @@ call_hello_update_cb_async (void *cls, | |||
1663 | struct GNUNET_TRANSPORT_GetHelloHandle *ghh = cls; | 1663 | struct GNUNET_TRANSPORT_GetHelloHandle *ghh = cls; |
1664 | 1664 | ||
1665 | GNUNET_assert (NULL != ghh->handle->my_hello); | 1665 | GNUNET_assert (NULL != ghh->handle->my_hello); |
1666 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != ghh->notify_task); | 1666 | GNUNET_assert (NULL != ghh->notify_task); |
1667 | ghh->notify_task = GNUNET_SCHEDULER_NO_TASK; | 1667 | ghh->notify_task = NULL; |
1668 | ghh->rec (ghh->rec_cls, | 1668 | ghh->rec (ghh->rec_cls, |
1669 | (const struct GNUNET_MessageHeader *) ghh->handle->my_hello); | 1669 | (const struct GNUNET_MessageHeader *) ghh->handle->my_hello); |
1670 | } | 1670 | } |
@@ -1711,7 +1711,7 @@ GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_GetHelloHandle *ghh) | |||
1711 | { | 1711 | { |
1712 | struct GNUNET_TRANSPORT_Handle *handle = ghh->handle; | 1712 | struct GNUNET_TRANSPORT_Handle *handle = ghh->handle; |
1713 | 1713 | ||
1714 | if (GNUNET_SCHEDULER_NO_TASK != ghh->notify_task) | 1714 | if (NULL != ghh->notify_task) |
1715 | GNUNET_SCHEDULER_cancel (ghh->notify_task); | 1715 | GNUNET_SCHEDULER_cancel (ghh->notify_task); |
1716 | GNUNET_CONTAINER_DLL_remove (handle->hwl_head, handle->hwl_tail, ghh); | 1716 | GNUNET_CONTAINER_DLL_remove (handle->hwl_head, handle->hwl_tail, ghh); |
1717 | GNUNET_free (ghh); | 1717 | GNUNET_free (ghh); |
@@ -1810,20 +1810,20 @@ GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle) | |||
1810 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1810 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1811 | "Transport disconnect called!\n"); | 1811 | "Transport disconnect called!\n"); |
1812 | /* this disconnects all neighbours... */ | 1812 | /* this disconnects all neighbours... */ |
1813 | if (handle->reconnect_task == GNUNET_SCHEDULER_NO_TASK) | 1813 | if (handle->reconnect_task == NULL) |
1814 | disconnect_and_schedule_reconnect (handle); | 1814 | disconnect_and_schedule_reconnect (handle); |
1815 | /* and now we stop trying to connect again... */ | 1815 | /* and now we stop trying to connect again... */ |
1816 | if (handle->reconnect_task != GNUNET_SCHEDULER_NO_TASK) | 1816 | if (handle->reconnect_task != NULL) |
1817 | { | 1817 | { |
1818 | GNUNET_SCHEDULER_cancel (handle->reconnect_task); | 1818 | GNUNET_SCHEDULER_cancel (handle->reconnect_task); |
1819 | handle->reconnect_task = GNUNET_SCHEDULER_NO_TASK; | 1819 | handle->reconnect_task = NULL; |
1820 | } | 1820 | } |
1821 | GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours); | 1821 | GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours); |
1822 | handle->neighbours = NULL; | 1822 | handle->neighbours = NULL; |
1823 | if (handle->quota_task != GNUNET_SCHEDULER_NO_TASK) | 1823 | if (handle->quota_task != NULL) |
1824 | { | 1824 | { |
1825 | GNUNET_SCHEDULER_cancel (handle->quota_task); | 1825 | GNUNET_SCHEDULER_cancel (handle->quota_task); |
1826 | handle->quota_task = GNUNET_SCHEDULER_NO_TASK; | 1826 | handle->quota_task = NULL; |
1827 | } | 1827 | } |
1828 | GNUNET_free_non_null (handle->my_hello); | 1828 | GNUNET_free_non_null (handle->my_hello); |
1829 | handle->my_hello = NULL; | 1829 | handle->my_hello = NULL; |
@@ -1926,9 +1926,9 @@ GNUNET_TRANSPORT_notify_transmit_ready_cancel (struct GNUNET_TRANSPORT_TransmitH | |||
1926 | } | 1926 | } |
1927 | else | 1927 | else |
1928 | { | 1928 | { |
1929 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != th->timeout_task); | 1929 | GNUNET_assert (NULL != th->timeout_task); |
1930 | GNUNET_SCHEDULER_cancel (th->timeout_task); | 1930 | GNUNET_SCHEDULER_cancel (th->timeout_task); |
1931 | th->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 1931 | th->timeout_task = NULL; |
1932 | } | 1932 | } |
1933 | GNUNET_free (th); | 1933 | GNUNET_free (th); |
1934 | } | 1934 | } |
diff --git a/src/transport/transport_api_monitor_peers.c b/src/transport/transport_api_monitor_peers.c index 611580f68..aaf1000f6 100644 --- a/src/transport/transport_api_monitor_peers.c +++ b/src/transport/transport_api_monitor_peers.c | |||
@@ -74,7 +74,7 @@ struct GNUNET_TRANSPORT_PeerMonitoringContext | |||
74 | /** | 74 | /** |
75 | * Task ID for reconnect. | 75 | * Task ID for reconnect. |
76 | */ | 76 | */ |
77 | GNUNET_SCHEDULER_TaskIdentifier reconnect_task; | 77 | struct GNUNET_SCHEDULER_Task * reconnect_task; |
78 | 78 | ||
79 | /** | 79 | /** |
80 | * Identity of the peer to monitor. | 80 | * Identity of the peer to monitor. |
@@ -212,7 +212,7 @@ do_peer_connect (void *cls, | |||
212 | { | 212 | { |
213 | struct GNUNET_TRANSPORT_PeerMonitoringContext *pal_ctx = cls; | 213 | struct GNUNET_TRANSPORT_PeerMonitoringContext *pal_ctx = cls; |
214 | 214 | ||
215 | pal_ctx->reconnect_task = GNUNET_SCHEDULER_NO_TASK; | 215 | pal_ctx->reconnect_task = NULL; |
216 | pal_ctx->client = GNUNET_CLIENT_connect ("transport", pal_ctx->cfg); | 216 | pal_ctx->client = GNUNET_CLIENT_connect ("transport", pal_ctx->cfg); |
217 | GNUNET_assert (NULL != pal_ctx->client); | 217 | GNUNET_assert (NULL != pal_ctx->client); |
218 | send_peer_mon_request (pal_ctx); | 218 | send_peer_mon_request (pal_ctx); |
@@ -455,10 +455,10 @@ GNUNET_TRANSPORT_monitor_peers_cancel (struct GNUNET_TRANSPORT_PeerMonitoringCon | |||
455 | GNUNET_CLIENT_disconnect (pic->client); | 455 | GNUNET_CLIENT_disconnect (pic->client); |
456 | pic->client = NULL; | 456 | pic->client = NULL; |
457 | } | 457 | } |
458 | if (GNUNET_SCHEDULER_NO_TASK != pic->reconnect_task) | 458 | if (NULL != pic->reconnect_task) |
459 | { | 459 | { |
460 | GNUNET_SCHEDULER_cancel (pic->reconnect_task); | 460 | GNUNET_SCHEDULER_cancel (pic->reconnect_task); |
461 | pic->reconnect_task = GNUNET_SCHEDULER_NO_TASK; | 461 | pic->reconnect_task = NULL; |
462 | } | 462 | } |
463 | GNUNET_free (pic); | 463 | GNUNET_free (pic); |
464 | } | 464 | } |
diff --git a/src/transport/transport_api_monitor_plugins.c b/src/transport/transport_api_monitor_plugins.c index 0c6cb9214..6ecee9c98 100644 --- a/src/transport/transport_api_monitor_plugins.c +++ b/src/transport/transport_api_monitor_plugins.c | |||
@@ -72,7 +72,7 @@ struct GNUNET_TRANSPORT_PluginMonitor | |||
72 | /** | 72 | /** |
73 | * Task ID for reconnect. | 73 | * Task ID for reconnect. |
74 | */ | 74 | */ |
75 | GNUNET_SCHEDULER_TaskIdentifier reconnect_task; | 75 | struct GNUNET_SCHEDULER_Task * reconnect_task; |
76 | 76 | ||
77 | }; | 77 | }; |
78 | 78 | ||
@@ -141,7 +141,7 @@ do_plugin_connect (void *cls, | |||
141 | { | 141 | { |
142 | struct GNUNET_TRANSPORT_PluginMonitor *pm = cls; | 142 | struct GNUNET_TRANSPORT_PluginMonitor *pm = cls; |
143 | 143 | ||
144 | pm->reconnect_task = GNUNET_SCHEDULER_NO_TASK; | 144 | pm->reconnect_task = NULL; |
145 | pm->client = GNUNET_CLIENT_connect ("transport", pm->cfg); | 145 | pm->client = GNUNET_CLIENT_connect ("transport", pm->cfg); |
146 | GNUNET_assert (NULL != pm->client); | 146 | GNUNET_assert (NULL != pm->client); |
147 | send_plugin_mon_request (pm); | 147 | send_plugin_mon_request (pm); |
@@ -442,10 +442,10 @@ GNUNET_TRANSPORT_monitor_plugins_cancel (struct GNUNET_TRANSPORT_PluginMonitor * | |||
442 | GNUNET_CLIENT_disconnect (pm->client); | 442 | GNUNET_CLIENT_disconnect (pm->client); |
443 | pm->client = NULL; | 443 | pm->client = NULL; |
444 | } | 444 | } |
445 | if (GNUNET_SCHEDULER_NO_TASK != pm->reconnect_task) | 445 | if (NULL != pm->reconnect_task) |
446 | { | 446 | { |
447 | GNUNET_SCHEDULER_cancel (pm->reconnect_task); | 447 | GNUNET_SCHEDULER_cancel (pm->reconnect_task); |
448 | pm->reconnect_task = GNUNET_SCHEDULER_NO_TASK; | 448 | pm->reconnect_task = NULL; |
449 | } | 449 | } |
450 | clear_map (pm); | 450 | clear_map (pm); |
451 | GNUNET_CONTAINER_multihashmap32_destroy (pm->sessions); | 451 | GNUNET_CONTAINER_multihashmap32_destroy (pm->sessions); |
diff --git a/src/transport/transport_api_monitor_validation.c b/src/transport/transport_api_monitor_validation.c index 621a6b00e..a82e3c156 100644 --- a/src/transport/transport_api_monitor_validation.c +++ b/src/transport/transport_api_monitor_validation.c | |||
@@ -72,7 +72,7 @@ struct GNUNET_TRANSPORT_ValidationMonitoringContext | |||
72 | /** | 72 | /** |
73 | * Task ID for reconnect. | 73 | * Task ID for reconnect. |
74 | */ | 74 | */ |
75 | GNUNET_SCHEDULER_TaskIdentifier reconnect_task; | 75 | struct GNUNET_SCHEDULER_Task * reconnect_task; |
76 | 76 | ||
77 | /** | 77 | /** |
78 | * Identity of the peer to monitor. | 78 | * Identity of the peer to monitor. |
@@ -162,7 +162,7 @@ do_val_connect (void *cls, | |||
162 | { | 162 | { |
163 | struct GNUNET_TRANSPORT_ValidationMonitoringContext *val_ctx = cls; | 163 | struct GNUNET_TRANSPORT_ValidationMonitoringContext *val_ctx = cls; |
164 | 164 | ||
165 | val_ctx->reconnect_task = GNUNET_SCHEDULER_NO_TASK; | 165 | val_ctx->reconnect_task = NULL; |
166 | val_ctx->client = GNUNET_CLIENT_connect ("transport", val_ctx->cfg); | 166 | val_ctx->client = GNUNET_CLIENT_connect ("transport", val_ctx->cfg); |
167 | GNUNET_assert (NULL != val_ctx->client); | 167 | GNUNET_assert (NULL != val_ctx->client); |
168 | send_val_mon_request (val_ctx); | 168 | send_val_mon_request (val_ctx); |
@@ -412,10 +412,10 @@ GNUNET_TRANSPORT_monitor_validation_entries_cancel (struct GNUNET_TRANSPORT_Vali | |||
412 | GNUNET_CLIENT_disconnect (vic->client); | 412 | GNUNET_CLIENT_disconnect (vic->client); |
413 | vic->client = NULL; | 413 | vic->client = NULL; |
414 | } | 414 | } |
415 | if (GNUNET_SCHEDULER_NO_TASK != vic->reconnect_task) | 415 | if (NULL != vic->reconnect_task) |
416 | { | 416 | { |
417 | GNUNET_SCHEDULER_cancel (vic->reconnect_task); | 417 | GNUNET_SCHEDULER_cancel (vic->reconnect_task); |
418 | vic->reconnect_task = GNUNET_SCHEDULER_NO_TASK; | 418 | vic->reconnect_task = NULL; |
419 | } | 419 | } |
420 | GNUNET_free (vic); | 420 | GNUNET_free (vic); |
421 | } | 421 | } |