another channel-add destroy-cancel fix
authorChristian Grothoff <christian@grothoff.org>
Wed, 1 Feb 2017 08:36:14 +0000 (09:36 +0100)
committerChristian Grothoff <christian@grothoff.org>
Wed, 1 Feb 2017 08:36:14 +0000 (09:36 +0100)
src/cadet/gnunet-service-cadet-new_tunnels.c

index cbc1303d9e4072c4c89c32eb9f58f539fee354bf..c1532e835c783c4d2edfdcda0c62c1f6718a5d82 100644 (file)
@@ -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),