diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-04-30 08:17:37 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-04-30 08:17:37 +0000 |
commit | 95f9076a2139f5fb042b944a0658b6cda2fa35db (patch) | |
tree | b0826a2a1dcf812e6b4450fe6b05d47cd53ae49d /src/arm/arm_api.c | |
parent | 7746f68db77b9ca3c4aaca24ab2ce5253461240b (diff) | |
download | gnunet-95f9076a2139f5fb042b944a0658b6cda2fa35db.tar.gz gnunet-95f9076a2139f5fb042b944a0658b6cda2fa35db.zip |
implementing new scheduler shutdown semantics
Diffstat (limited to 'src/arm/arm_api.c')
-rw-r--r-- | src/arm/arm_api.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c index c708f9150..5fb2a811a 100644 --- a/src/arm/arm_api.c +++ b/src/arm/arm_api.c | |||
@@ -241,7 +241,9 @@ reconnect_arm_later (struct GNUNET_ARM_Handle *h) | |||
241 | h->currently_down = GNUNET_YES; | 241 | h->currently_down = GNUNET_YES; |
242 | GNUNET_assert (NULL == h->reconnect_task); | 242 | GNUNET_assert (NULL == h->reconnect_task); |
243 | h->reconnect_task = | 243 | h->reconnect_task = |
244 | GNUNET_SCHEDULER_add_delayed (h->retry_backoff, &reconnect_arm_task, h); | 244 | GNUNET_SCHEDULER_add_delayed (h->retry_backoff, |
245 | &reconnect_arm_task, | ||
246 | h); | ||
245 | /* Don't clear pending messages on disconnection, deliver them later | 247 | /* Don't clear pending messages on disconnection, deliver them later |
246 | clear_pending_messages (h, GNUNET_ARM_REQUEST_DISCONNECTED); | 248 | clear_pending_messages (h, GNUNET_ARM_REQUEST_DISCONNECTED); |
247 | GNUNET_assert (NULL == h->control_pending_head); | 249 | GNUNET_assert (NULL == h->control_pending_head); |
@@ -635,7 +637,8 @@ reconnect_arm (struct GNUNET_ARM_Handle *h) | |||
635 | */ | 637 | */ |
636 | struct GNUNET_ARM_Handle * | 638 | struct GNUNET_ARM_Handle * |
637 | GNUNET_ARM_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | 639 | GNUNET_ARM_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
638 | GNUNET_ARM_ConnectionStatusCallback conn_status, void *cls) | 640 | GNUNET_ARM_ConnectionStatusCallback conn_status, |
641 | void *cls) | ||
639 | { | 642 | { |
640 | struct GNUNET_ARM_Handle *h; | 643 | struct GNUNET_ARM_Handle *h; |
641 | 644 | ||
@@ -942,7 +945,8 @@ change_service (struct GNUNET_ARM_Handle *h, const char *service_name, | |||
942 | h->control_pending_tail, cm); | 945 | h->control_pending_tail, cm); |
943 | cm->timeout_task_id = | 946 | cm->timeout_task_id = |
944 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining | 947 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining |
945 | (cm->timeout), &control_message_timeout, cm); | 948 | (cm->timeout), |
949 | &control_message_timeout, cm); | ||
946 | trigger_next_request (h, GNUNET_NO); | 950 | trigger_next_request (h, GNUNET_NO); |
947 | } | 951 | } |
948 | 952 | ||
@@ -1106,7 +1110,8 @@ GNUNET_ARM_request_service_list (struct GNUNET_ARM_Handle *h, | |||
1106 | h->control_pending_tail, cm); | 1110 | h->control_pending_tail, cm); |
1107 | cm->timeout_task_id = | 1111 | cm->timeout_task_id = |
1108 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining | 1112 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining |
1109 | (cm->timeout), &control_message_timeout, cm); | 1113 | (cm->timeout), |
1114 | &control_message_timeout, cm); | ||
1110 | trigger_next_request (h, GNUNET_NO); | 1115 | trigger_next_request (h, GNUNET_NO); |
1111 | } | 1116 | } |
1112 | 1117 | ||