From 95f9076a2139f5fb042b944a0658b6cda2fa35db Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 30 Apr 2016 08:17:37 +0000 Subject: implementing new scheduler shutdown semantics --- src/hostlist/test_gnunet_daemon_hostlist_reconnect.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/hostlist/test_gnunet_daemon_hostlist_reconnect.c') diff --git a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c index 0af16e065..562eec55b 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c @@ -100,11 +100,13 @@ timeout_error (void *cls) * @param distance in overlay hops, as given by transport plugin */ static void -notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer) +notify_connect (void *cls, + const struct GNUNET_PeerIdentity *peer) { if (peer == NULL) return; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected, shutting down.\n"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Peers connected, shutting down.\n"); ok = 0; if (timeout_task != NULL) { @@ -116,7 +118,8 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer) static void -process_hello (void *cls, const struct GNUNET_MessageHeader *message) +process_hello (void *cls, + const struct GNUNET_MessageHeader *message) { struct PeerContext *p = cls; @@ -171,7 +174,8 @@ static void stop_arm (struct PeerContext *p) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Asking ARM to stop core service\n"); - GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &waitpid_task, p); + GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, + &waitpid_task, p); } @@ -192,8 +196,10 @@ run (void *cls, char *const *args, const char *cfgfile, { GNUNET_assert (ok == 1); ok++; - timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &timeout_error, NULL); - GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, + timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, + &timeout_error, NULL); + GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, + &shutdown_task, NULL); setup_peer (&p1, "test_gnunet_daemon_hostlist_peer1.conf"); setup_peer (&p2, "test_gnunet_daemon_hostlist_peer2.conf"); -- cgit v1.2.3