fix
authorChristian Grothoff <christian@grothoff.org>
Tue, 7 Sep 2010 08:58:33 +0000 (08:58 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 7 Sep 2010 08:58:33 +0000 (08:58 +0000)
src/fs/fs_test_lib.c
src/fs/fs_test_lib.h
src/fs/test_gnunet_service_fs_migration.c

index 9f82608ed6ce859ed6b783e0e5ebc6c061ded85a..aeb0bde0617f9ebdcea6c51551b30b19b39b839c 100644 (file)
@@ -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;i<sctx->total;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,
index d25f594e3cc59e2355a294e9d6b1535d4a88fd2d..2d8645cf962d36dd52d064d26fb1ab59252a4ea1 100644 (file)
@@ -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
index 89750b368c1fe38d5f7efbf0f2e7fb4b2cb2c049..78113252167aef08a2642730e45b8a0b4922b96a 100644 (file)
@@ -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;
     }