aboutsummaryrefslogtreecommitdiff
path: root/src/arm/test_exponential_backoff.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arm/test_exponential_backoff.c')
-rw-r--r--src/arm/test_exponential_backoff.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/arm/test_exponential_backoff.c b/src/arm/test_exponential_backoff.c
index 1032a9010..3f33c91e6 100644
--- a/src/arm/test_exponential_backoff.c
+++ b/src/arm/test_exponential_backoff.c
@@ -90,7 +90,7 @@ struct ShutdownContext
90 /** 90 /**
91 * Task set up to cancel the shutdown request on timeout. 91 * Task set up to cancel the shutdown request on timeout.
92 */ 92 */
93 struct GNUNET_SCHEDULER_Task * cancel_task; 93 struct GNUNET_SCHEDULER_Task *cancel_task;
94 94
95 /** 95 /**
96 * Task to call once shutdown complete 96 * Task to call once shutdown complete
@@ -235,7 +235,7 @@ shutdown_cont (void *cls, int reason)
235 { 235 {
236 /* Re-try shutdown */ 236 /* Re-try shutdown */
237 LOG ("do-nothing didn't die, trying again\n"); 237 LOG ("do-nothing didn't die, trying again\n");
238 GNUNET_SCHEDULER_add_now (kill_task, NULL); 238 GNUNET_SCHEDULER_add_now (&kill_task, NULL);
239 return; 239 return;
240 } 240 }
241 startedWaitingAt = GNUNET_TIME_absolute_get (); 241 startedWaitingAt = GNUNET_TIME_absolute_get ();
@@ -290,12 +290,15 @@ trigger_disconnect (void *cls)
290 290
291 291
292static void 292static void
293arm_stop_cb (void *cls, enum GNUNET_ARM_RequestStatus status, const char *servicename, enum GNUNET_ARM_Result result) 293arm_stop_cb (void *cls,
294 enum GNUNET_ARM_RequestStatus status,
295 const char *servicename,
296 enum GNUNET_ARM_Result result)
294{ 297{
295 GNUNET_break (status == GNUNET_ARM_REQUEST_SENT_OK); 298 GNUNET_break (status == GNUNET_ARM_REQUEST_SENT_OK);
296 GNUNET_break (result == GNUNET_ARM_RESULT_STOPPED); 299 GNUNET_break (result == GNUNET_ARM_RESULT_STOPPED);
297 LOG ("ARM service stopped\n"); 300 LOG ("ARM service stopped\n");
298 GNUNET_SCHEDULER_add_now (trigger_disconnect, NULL); 301 GNUNET_SCHEDULER_add_now (&trigger_disconnect, NULL);
299} 302}
300 303
301 304
@@ -318,7 +321,8 @@ srv_status (void *cls, const char *service, enum GNUNET_ARM_ServiceStatus status
318 LOG ("do-nothing is starting\n"); 321 LOG ("do-nothing is starting\n");
319 phase++; 322 phase++;
320 ok = 1; 323 ok = 1;
321 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &kill_task, NULL); 324 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
325 &kill_task, NULL);
322 } 326 }
323 else if ((phase == 2) && (strcasecmp (SERVICE, service) == 0)) 327 else if ((phase == 2) && (strcasecmp (SERVICE, service) == 0))
324 { 328 {
@@ -328,7 +332,7 @@ srv_status (void *cls, const char *service, enum GNUNET_ARM_ServiceStatus status
328 if (status == GNUNET_ARM_SERVICE_STARTING) 332 if (status == GNUNET_ARM_SERVICE_STARTING)
329 { 333 {
330 LOG ("do-nothing is starting\n"); 334 LOG ("do-nothing is starting\n");
331 GNUNET_SCHEDULER_add_now (kill_task, &ok); 335 GNUNET_SCHEDULER_add_now (&kill_task, &ok);
332 } 336 }
333 else if ((status == GNUNET_ARM_SERVICE_STOPPED) && (trialCount == 14)) 337 else if ((status == GNUNET_ARM_SERVICE_STOPPED) && (trialCount == 14))
334 { 338 {