From 0b50af049df2c6468d8f5ff1f05ed118c9a7ffb8 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 14 Jun 2010 18:55:25 +0000 Subject: [PATCH] fix --- src/fs/fs_test_lib.c | 30 +++++++++++------------ src/fs/test_gnunet_service_fs_migration.c | 1 - 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/fs/fs_test_lib.c b/src/fs/fs_test_lib.c index 676450efe..f69990a17 100644 --- a/src/fs/fs_test_lib.c +++ b/src/fs/fs_test_lib.c @@ -228,7 +228,6 @@ progress_cb (void *cls, } - struct StartContext { struct GNUNET_SCHEDULER_Handle *sched; @@ -253,7 +252,6 @@ notify_running (void *cls, { struct StartContext *sctx = cls; unsigned int i; - unsigned long long fsport; if (emsg != NULL) { @@ -262,11 +260,21 @@ notify_running (void *cls, emsg); return; } + i = 0; + while (i < sctx->total) + { + if (GNUNET_TESTING_daemon_get (sctx->group, + i) == d) + break; + i++; + } + GNUNET_assert (i < sctx->total); GNUNET_assert (sctx->have < sctx->total); - sctx->daemons[sctx->have]->cfg = GNUNET_CONFIGURATION_dup (cfg); - sctx->daemons[sctx->have]->group = sctx->group; - sctx->daemons[sctx->have]->daemon = d; - sctx->daemons[sctx->have]->id = *id; + GNUNET_assert (sctx->daemons[i]->cfg == NULL); + sctx->daemons[i]->cfg = GNUNET_CONFIGURATION_dup (cfg); + sctx->daemons[i]->group = sctx->group; + sctx->daemons[i]->daemon = d; + sctx->daemons[i]->id = *id; sctx->have++; if (sctx->have == sctx->total) { @@ -279,16 +287,6 @@ notify_running (void *cls, sctx->timeout_task); for (i=0;itotal;i++) { - fsport = 0; - GNUNET_break (GNUNET_OK == - GNUNET_CONFIGURATION_get_value_number (sctx->daemons[i]->cfg, - "fs", - "PORT", - &fsport)); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - _("Testing connects to port %llu for peer %u\n"), - fsport, - i); sctx->daemons[i]->fs = GNUNET_FS_start (sctx->sched, sctx->daemons[i]->cfg, "", diff --git a/src/fs/test_gnunet_service_fs_migration.c b/src/fs/test_gnunet_service_fs_migration.c index 835650ef6..8b68da2fb 100644 --- a/src/fs/test_gnunet_service_fs_migration.c +++ b/src/fs/test_gnunet_service_fs_migration.c @@ -159,7 +159,6 @@ do_wait (void *cls, } - static void do_publish (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) -- 2.25.1