/**
* Task run upon shutdown interrupts
*/
- struct GNUNET_SCHEDULER_Task * interrupt_task;
+ struct GNUNET_SCHEDULER_Task *interrupt_task;
/**
* The event mask for the controller
unsigned int size;
/* reschedule */
- rc->interrupt_task = GNUNET_SCHEDULER_add_delayed
- (GNUNET_TIME_UNIT_FOREVER_REL, &interrupt, rc);
+ rc->interrupt_task = GNUNET_SCHEDULER_add_shutdown (&interrupt, rc);
rc_cleanup_operations (rc);
if ( (GNUNET_NO == rc->shutdown) &&
(NULL != c) &&
GNUNET_SCHEDULER_shutdown ();
return;
}
- rc->register_hosts_task = GNUNET_SCHEDULER_add_now (®ister_hosts, rc);
+ rc->register_hosts_task = GNUNET_SCHEDULER_add_now (®ister_hosts,
+ rc);
}
}
rc->rcop_map = GNUNET_CONTAINER_multihashmap32_create (256);
rc->timeout_task =
- GNUNET_SCHEDULER_add_delayed (timeout, &timeout_task, rc);
+ GNUNET_SCHEDULER_add_delayed (timeout, &timeout_task, rc);
+ GNUNET_assert (NULL == rc->interrupt_task);
rc->interrupt_task =
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &interrupt,
- rc);
+ GNUNET_SCHEDULER_add_shutdown (&interrupt,
+ rc);
return;
error_cleanup: