aboutsummaryrefslogtreecommitdiff
path: root/src/dht/test_dht_multipeer.c
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2012-02-24 16:27:36 +0000
committerBart Polot <bart@net.in.tum.de>2012-02-24 16:27:36 +0000
commitef3ab57bc87489dffddc25714196198a01115bba (patch)
tree7f61608b1f476cb2f19e85c77c9571144ea2dc82 /src/dht/test_dht_multipeer.c
parent1f53f3eac1fe5673c7933a25710e2f4fb73b8270 (diff)
downloadgnunet-ef3ab57bc87489dffddc25714196198a01115bba.tar.gz
gnunet-ef3ab57bc87489dffddc25714196198a01115bba.zip
- Attemp to avoid testing hang on ctrl-c during bootstrap
Diffstat (limited to 'src/dht/test_dht_multipeer.c')
-rw-r--r--src/dht/test_dht_multipeer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dht/test_dht_multipeer.c b/src/dht/test_dht_multipeer.c
index b8da82a2d..48946df75 100644
--- a/src/dht/test_dht_multipeer.c
+++ b/src/dht/test_dht_multipeer.c
@@ -224,11 +224,13 @@ shutdown_callback (void *cls, const char *emsg)
224 if (ok == 0) 224 if (ok == 0)
225 ok = 2; 225 ok = 2;
226 } 226 }
227 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Shutdown callback completed.\n");
227} 228}
228 229
229static void 230static void
230do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 231do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
231{ 232{
233 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Shutdown requested.\n");
232 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); 234 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
233 pg = NULL; 235 pg = NULL;
234} 236}
@@ -788,6 +790,8 @@ run (void *cls, char *const *args, const char *cfgfile,
788 pg = GNUNET_TESTING_peergroup_start (cfg, num_peers, TIMEOUT, NULL, 790 pg = GNUNET_TESTING_peergroup_start (cfg, num_peers, TIMEOUT, NULL,
789 &startup_done, NULL, NULL); 791 &startup_done, NULL, NULL);
790 GNUNET_assert (NULL != pg); 792 GNUNET_assert (NULL != pg);
793 GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_FOREVER_REL,
794 &do_stop, NULL);
791} 795}
792 796
793 797