From: Christian Grothoff Date: Tue, 7 Sep 2010 08:58:33 +0000 (+0000) Subject: fix X-Git-Tag: initial-import-from-subversion-38251~20431 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9d8fd65fa5a25ac4bd5d65d1be8b07427069ca65;p=oweals%2Fgnunet.git fix --- diff --git a/src/fs/fs_test_lib.c b/src/fs/fs_test_lib.c index 9f82608ed..aeb0bde06 100644 --- a/src/fs/fs_test_lib.c +++ b/src/fs/fs_test_lib.c @@ -328,12 +328,16 @@ start_timeout (void *cls, struct StartContext *sctx = cls; unsigned int i; - GNUNET_TESTING_daemons_stop (sctx->group, GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 30), &shutdown_callback, NULL); + GNUNET_TESTING_daemons_stop (sctx->group, + GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 30), + &shutdown_callback, + NULL); for (i=0;itotal;i++) { if (i < sctx->have) GNUNET_CONFIGURATION_destroy (sctx->daemons[i]->cfg); GNUNET_free (sctx->daemons[i]); + sctx->daemons[i] = NULL; } GNUNET_CONFIGURATION_destroy (sctx->cfg); GNUNET_SCHEDULER_add_continuation (sctx->sched, diff --git a/src/fs/fs_test_lib.h b/src/fs/fs_test_lib.h index d25f594e3..2d8645cf9 100644 --- a/src/fs/fs_test_lib.h +++ b/src/fs/fs_test_lib.h @@ -48,7 +48,10 @@ struct GNUNET_FS_TestDaemon; * @param total number of daemons to start * @param daemons array of 'total' entries to be initialized * (array must already be allocated, will be filled) - * @param cont function to call when done + * @param cont function to call when done; note that if 'cont' + * is called with reason "TIMEOUT", then starting the + * daemons has failed and the client MUST NOT call + * 'GNUNET_FS_TEST_daemons_stop'! * @param cont_cls closure for cont */ void diff --git a/src/fs/test_gnunet_service_fs_migration.c b/src/fs/test_gnunet_service_fs_migration.c index 89750b368..781132521 100644 --- a/src/fs/test_gnunet_service_fs_migration.c +++ b/src/fs/test_gnunet_service_fs_migration.c @@ -196,7 +196,6 @@ do_connect (void *cls, fprintf (stderr, "Daemons failed to start!\n"); GNUNET_break (0); - GNUNET_FS_TEST_daemons_stop (sched, 2, daemons); ok = 1; return; }