From 08ac9f58f96ede5158ca9ff371691390e87aeff4 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 1 Feb 2017 09:36:14 +0100 Subject: [PATCH] another channel-add destroy-cancel fix --- src/cadet/gnunet-service-cadet-new_tunnels.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cadet/gnunet-service-cadet-new_tunnels.c b/src/cadet/gnunet-service-cadet-new_tunnels.c index cbc1303d9..c1532e835 100644 --- a/src/cadet/gnunet-service-cadet-new_tunnels.c +++ b/src/cadet/gnunet-service-cadet-new_tunnels.c @@ -1910,6 +1910,11 @@ GCT_add_channel (struct CadetTunnel *t, struct GNUNET_CADET_ChannelTunnelNumber ctn; ctn = get_next_free_ctn (t); + if (NULL != t->destroy_task) + { + GNUNET_SCHEDULER_cancel (t->destroy_task); + t->destroy_task = NULL; + } GNUNET_assert (GNUNET_YES == GNUNET_CONTAINER_multihashmap32_put (t->channels, ntohl (ctn.cn), -- 2.25.1