aboutsummaryrefslogtreecommitdiff
path: root/src/arm/arm_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arm/arm_api.c')
-rw-r--r--src/arm/arm_api.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c
index 1b83c3106..4b68f19de 100644
--- a/src/arm/arm_api.c
+++ b/src/arm/arm_api.c
@@ -91,7 +91,7 @@ struct GNUNET_ARM_Handle
91 /** 91 /**
92 * ID of the reconnect task (if any). 92 * ID of the reconnect task (if any).
93 */ 93 */
94 GNUNET_SCHEDULER_TaskIdentifier reconnect_task; 94 struct GNUNET_SCHEDULER_Task * reconnect_task;
95 95
96 /** 96 /**
97 * Current delay we use for re-trying to connect to core. 97 * Current delay we use for re-trying to connect to core.
@@ -166,7 +166,7 @@ struct ARMControlMessage
166 /** 166 /**
167 * Task to run when request times out. 167 * Task to run when request times out.
168 */ 168 */
169 GNUNET_SCHEDULER_TaskIdentifier timeout_task_id; 169 struct GNUNET_SCHEDULER_Task * timeout_task_id;
170 170
171 /** 171 /**
172 * Flags for passing std descriptors to ARM (when starting ARM). 172 * Flags for passing std descriptors to ARM (when starting ARM).
@@ -212,7 +212,7 @@ reconnect_arm_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
212{ 212{
213 struct GNUNET_ARM_Handle *h = cls; 213 struct GNUNET_ARM_Handle *h = cls;
214 214
215 h->reconnect_task = GNUNET_SCHEDULER_NO_TASK; 215 h->reconnect_task = NULL;
216 LOG (GNUNET_ERROR_TYPE_DEBUG, "Connecting to ARM service after delay\n"); 216 LOG (GNUNET_ERROR_TYPE_DEBUG, "Connecting to ARM service after delay\n");
217 reconnect_arm (h); 217 reconnect_arm (h);
218} 218}
@@ -240,7 +240,7 @@ reconnect_arm_later (struct GNUNET_ARM_Handle *h)
240 h->client = NULL; 240 h->client = NULL;
241 } 241 }
242 h->currently_down = GNUNET_YES; 242 h->currently_down = GNUNET_YES;
243 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == h->reconnect_task); 243 GNUNET_assert (NULL == h->reconnect_task);
244 h->reconnect_task = 244 h->reconnect_task =
245 GNUNET_SCHEDULER_add_delayed (h->retry_backoff, &reconnect_arm_task, h); 245 GNUNET_SCHEDULER_add_delayed (h->retry_backoff, &reconnect_arm_task, h);
246 /* Don't clear pending messages on disconnection, deliver them later 246 /* Don't clear pending messages on disconnection, deliver them later
@@ -408,7 +408,7 @@ client_notify_handler (void *cls,
408 fail = GNUNET_YES; 408 fail = GNUNET_YES;
409 break; 409 break;
410 } 410 }
411 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != cm->timeout_task_id); 411 GNUNET_assert (NULL != cm->timeout_task_id);
412 GNUNET_SCHEDULER_cancel (cm->timeout_task_id); 412 GNUNET_SCHEDULER_cancel (cm->timeout_task_id);
413 GNUNET_CONTAINER_DLL_remove (h->control_sent_head, 413 GNUNET_CONTAINER_DLL_remove (h->control_sent_head,
414 h->control_sent_tail, cm); 414 h->control_sent_tail, cm);
@@ -493,7 +493,7 @@ transmit_arm_message (void *cls, size_t size, void *buf)
493 LOG (GNUNET_ERROR_TYPE_DEBUG, 493 LOG (GNUNET_ERROR_TYPE_DEBUG,
494 "transmit_arm_message is running with %p buffer of size %lu. ARM is known to be %s\n", 494 "transmit_arm_message is running with %p buffer of size %lu. ARM is known to be %s\n",
495 buf, size, h->currently_down ? "unconnected" : "connected"); 495 buf, size, h->currently_down ? "unconnected" : "connected");
496 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == h->reconnect_task); 496 GNUNET_assert (NULL == h->reconnect_task);
497 h->cth = NULL; 497 h->cth = NULL;
498 if ((GNUNET_YES == h->currently_down) && (NULL != buf)) 498 if ((GNUNET_YES == h->currently_down) && (NULL != buf))
499 { 499 {
@@ -643,7 +643,7 @@ GNUNET_ARM_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
643 h = GNUNET_new (struct GNUNET_ARM_Handle); 643 h = GNUNET_new (struct GNUNET_ARM_Handle);
644 h->cfg = GNUNET_CONFIGURATION_dup (cfg); 644 h->cfg = GNUNET_CONFIGURATION_dup (cfg);
645 h->currently_down = GNUNET_YES; 645 h->currently_down = GNUNET_YES;
646 h->reconnect_task = GNUNET_SCHEDULER_NO_TASK; 646 h->reconnect_task = NULL;
647 h->conn_status = conn_status; 647 h->conn_status = conn_status;
648 h->conn_status_cls = cls; 648 h->conn_status_cls = cls;
649 if (GNUNET_OK != reconnect_arm (h)) 649 if (GNUNET_OK != reconnect_arm (h))
@@ -680,7 +680,7 @@ GNUNET_ARM_disconnect_and_free (struct GNUNET_ARM_Handle *h)
680 else 680 else
681 GNUNET_CONTAINER_DLL_remove (h->control_sent_head, 681 GNUNET_CONTAINER_DLL_remove (h->control_sent_head,
682 h->control_sent_tail, cm); 682 h->control_sent_tail, cm);
683 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != cm->timeout_task_id); 683 GNUNET_assert (NULL != cm->timeout_task_id);
684 GNUNET_SCHEDULER_cancel (cm->timeout_task_id); 684 GNUNET_SCHEDULER_cancel (cm->timeout_task_id);
685 if (NULL != cm->result_cont) 685 if (NULL != cm->result_cont)
686 cm->result_cont (cm->cont_cls, GNUNET_ARM_REQUEST_DISCONNECTED, 686 cm->result_cont (cm->cont_cls, GNUNET_ARM_REQUEST_DISCONNECTED,
@@ -694,10 +694,10 @@ GNUNET_ARM_disconnect_and_free (struct GNUNET_ARM_Handle *h)
694 GNUNET_CLIENT_disconnect (h->client); 694 GNUNET_CLIENT_disconnect (h->client);
695 h->client = NULL; 695 h->client = NULL;
696 } 696 }
697 if (GNUNET_SCHEDULER_NO_TASK != h->reconnect_task) 697 if (NULL != h->reconnect_task)
698 { 698 {
699 GNUNET_SCHEDULER_cancel (h->reconnect_task); 699 GNUNET_SCHEDULER_cancel (h->reconnect_task);
700 h->reconnect_task = GNUNET_SCHEDULER_NO_TASK; 700 h->reconnect_task = NULL;
701 } 701 }
702 if (GNUNET_NO == h->service_test_is_active) 702 if (GNUNET_NO == h->service_test_is_active)
703 { 703 {
@@ -984,10 +984,10 @@ GNUNET_ARM_request_service_start (struct GNUNET_ARM_Handle *h,
984 GNUNET_CLIENT_disconnect (h->client); 984 GNUNET_CLIENT_disconnect (h->client);
985 h->client = NULL; 985 h->client = NULL;
986 } 986 }
987 if (GNUNET_SCHEDULER_NO_TASK != h->reconnect_task) 987 if (NULL != h->reconnect_task)
988 { 988 {
989 GNUNET_SCHEDULER_cancel (h->reconnect_task); 989 GNUNET_SCHEDULER_cancel (h->reconnect_task);
990 h->reconnect_task = GNUNET_SCHEDULER_NO_TASK; 990 h->reconnect_task = NULL;
991 } 991 }
992 992
993 LOG (GNUNET_ERROR_TYPE_DEBUG, 993 LOG (GNUNET_ERROR_TYPE_DEBUG,