From: Sree Harsha Totakura Date: Wed, 14 Nov 2012 15:11:19 +0000 (+0000) Subject: -fixes X-Git-Tag: initial-import-from-subversion-38251~10856 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=109dc0faed8cf1df4980c9fff9bca83bebdd099d;p=oweals%2Fgnunet.git -fixes --- 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 =