static struct GNUNET_TIME_Absolute start_time;
+static struct GNUNET_TESTBED_Operation *op;
+
static void
do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
do_publish (void *cls,
- struct GNUNET_TESTBED_Operation *op,
+ struct GNUNET_TESTBED_Operation *opret,
const char *emsg)
{
+ GNUNET_assert (op == opret);
+ GNUNET_TESTBED_operation_done (op);
+ op = NULL;
+
if (NULL != emsg)
{
GNUNET_SCHEDULER_shutdown ();
daemons[i] = peers[i];
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Daemons started, will now try to connect them\n");
- GNUNET_TESTBED_overlay_connect (NULL,
- &do_publish, NULL,
- daemons[0], daemons[1]);
+ op = GNUNET_TESTBED_overlay_connect (NULL,
+ &do_publish, NULL,
+ daemons[0], daemons[1]);
}