From: Nathan S. Evans Date: Wed, 16 Feb 2011 16:28:08 +0000 (+0000) Subject: change testing to use is peer connected X-Git-Tag: initial-import-from-subversion-38251~19117 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ffd3461b0e8f9ef299e40e8497efdfffdd1f0edd;p=oweals%2Fgnunet.git change testing to use is peer connected --- diff --git a/src/testing/testing.c b/src/testing/testing.c index fe6644aba..d0b0c1ee5 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c @@ -1539,6 +1539,8 @@ connect_notify (void *cls, { ctx->connected = GNUNET_YES; ctx->distance = 0; /* FIXME: distance */ + if (ctx->hello_send_task != GNUNET_SCHEDULER_NO_TASK) + GNUNET_SCHEDULER_cancel(ctx->hello_send_task); GNUNET_SCHEDULER_cancel (ctx->timeout_task); ctx->timeout_task = GNUNET_SCHEDULER_add_now (¬ify_connect_result, ctx); @@ -1774,7 +1776,8 @@ GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1, #endif /* Core is up! Iterate over all _known_ peers first to check if we are already connected to the peer! */ - GNUNET_CORE_iterate_peers(ctx->d1->cfg, &core_initial_iteration, ctx); + GNUNET_CORE_is_peer_connected (ctx->d1->cfg, &ctx->d2->id, &core_initial_iteration, ctx); + /* GNUNET_CORE_iterate_peers(ctx->d1->cfg, &core_initial_iteration, ctx); */ }