From 109dc0faed8cf1df4980c9fff9bca83bebdd099d Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Wed, 14 Nov 2012 15:11:19 +0000 Subject: [PATCH] -fixes --- src/testbed/gnunet-service-testbed.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/testbed/gnunet-service-testbed.c b/src/testbed/gnunet-service-testbed.c index 1cce1bf42..70c61cfdc 100644 --- a/src/testbed/gnunet-service-testbed.c +++ b/src/testbed/gnunet-service-testbed.c @@ -2897,14 +2897,13 @@ overlay_connect_notify (void *cls, const struct GNUNET_PeerIdentity *new_peer, GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != occ->timeout_task); GNUNET_SCHEDULER_cancel (occ->timeout_task); occ->timeout_task = GNUNET_SCHEDULER_NO_TASK; - GNUNET_free_non_null (occ->emsg); - occ->emsg = NULL; - if (NULL != occ->tcc.th) + if (GNUNET_SCHEDULER_NO_TASK != occ->tcc.task) { - GNUNET_TRANSPORT_disconnect (occ->tcc.th); - occ->tcc.th = NULL; - peer_list[occ->other_peer_id]->reference_cnt--; + GNUNET_SCHEDULER_cancel (occ->tcc.task); + occ->tcc.task = GNUNET_SCHEDULER_NO_TASK; } + GNUNET_free_non_null (occ->emsg); + occ->emsg = NULL; LOG_DEBUG ("Peers connected - Sending overlay connect success\n"); msg = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_ConnectionEventMessage)); msg->header.size = -- 2.25.1