diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-06-14 18:55:25 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-06-14 18:55:25 +0000 |
commit | 0b50af049df2c6468d8f5ff1f05ed118c9a7ffb8 (patch) | |
tree | fef2510bf278d1f8f52630e43b47afb95e78040e /src/fs/fs_test_lib.c | |
parent | 18308311e0d3f83ca05171b060430428d65ae0dd (diff) | |
download | gnunet-0b50af049df2c6468d8f5ff1f05ed118c9a7ffb8.tar.gz gnunet-0b50af049df2c6468d8f5ff1f05ed118c9a7ffb8.zip |
fix
Diffstat (limited to 'src/fs/fs_test_lib.c')
-rw-r--r-- | src/fs/fs_test_lib.c | 30 |
1 files changed, 14 insertions, 16 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, | |||
228 | } | 228 | } |
229 | 229 | ||
230 | 230 | ||
231 | |||
232 | struct StartContext | 231 | struct StartContext |
233 | { | 232 | { |
234 | struct GNUNET_SCHEDULER_Handle *sched; | 233 | struct GNUNET_SCHEDULER_Handle *sched; |
@@ -253,7 +252,6 @@ notify_running (void *cls, | |||
253 | { | 252 | { |
254 | struct StartContext *sctx = cls; | 253 | struct StartContext *sctx = cls; |
255 | unsigned int i; | 254 | unsigned int i; |
256 | unsigned long long fsport; | ||
257 | 255 | ||
258 | if (emsg != NULL) | 256 | if (emsg != NULL) |
259 | { | 257 | { |
@@ -262,11 +260,21 @@ notify_running (void *cls, | |||
262 | emsg); | 260 | emsg); |
263 | return; | 261 | return; |
264 | } | 262 | } |
263 | i = 0; | ||
264 | while (i < sctx->total) | ||
265 | { | ||
266 | if (GNUNET_TESTING_daemon_get (sctx->group, | ||
267 | i) == d) | ||
268 | break; | ||
269 | i++; | ||
270 | } | ||
271 | GNUNET_assert (i < sctx->total); | ||
265 | GNUNET_assert (sctx->have < sctx->total); | 272 | GNUNET_assert (sctx->have < sctx->total); |
266 | sctx->daemons[sctx->have]->cfg = GNUNET_CONFIGURATION_dup (cfg); | 273 | GNUNET_assert (sctx->daemons[i]->cfg == NULL); |
267 | sctx->daemons[sctx->have]->group = sctx->group; | 274 | sctx->daemons[i]->cfg = GNUNET_CONFIGURATION_dup (cfg); |
268 | sctx->daemons[sctx->have]->daemon = d; | 275 | sctx->daemons[i]->group = sctx->group; |
269 | sctx->daemons[sctx->have]->id = *id; | 276 | sctx->daemons[i]->daemon = d; |
277 | sctx->daemons[i]->id = *id; | ||
270 | sctx->have++; | 278 | sctx->have++; |
271 | if (sctx->have == sctx->total) | 279 | if (sctx->have == sctx->total) |
272 | { | 280 | { |
@@ -279,16 +287,6 @@ notify_running (void *cls, | |||
279 | sctx->timeout_task); | 287 | sctx->timeout_task); |
280 | for (i=0;i<sctx->total;i++) | 288 | for (i=0;i<sctx->total;i++) |
281 | { | 289 | { |
282 | fsport = 0; | ||
283 | GNUNET_break (GNUNET_OK == | ||
284 | GNUNET_CONFIGURATION_get_value_number (sctx->daemons[i]->cfg, | ||
285 | "fs", | ||
286 | "PORT", | ||
287 | &fsport)); | ||
288 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
289 | _("Testing connects to port %llu for peer %u\n"), | ||
290 | fsport, | ||
291 | i); | ||
292 | sctx->daemons[i]->fs = GNUNET_FS_start (sctx->sched, | 290 | sctx->daemons[i]->fs = GNUNET_FS_start (sctx->sched, |
293 | sctx->daemons[i]->cfg, | 291 | sctx->daemons[i]->cfg, |
294 | "<tester>", | 292 | "<tester>", |