From 3da2a8e83017cc13752c2865624ef8ae7e333afb Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 31 Jan 2017 11:24:17 +0100 Subject: [PATCH] cancel tunnel destruction if we get another channel during the grace period --- src/cadet/TODO | 4 +++- src/cadet/gnunet-service-cadet-new_tunnels.c | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/cadet/TODO b/src/cadet/TODO index cbce04e2f..f2aed163d 100644 --- a/src/cadet/TODO +++ b/src/cadet/TODO @@ -8,7 +8,9 @@ (need to push down through tunnel into connection selection); At Tunnel-level, try to create connections that match channel preferences (buffered/unbuffered) and select connections for - channel traffic that match channel preferences. + channel traffic that match channel preferences. + BUT: not sure this is ideal, discloses traffic type to + routers. We don't want that! (Maybe revise decision to do this?) - HIGH: revisit handling of 'buffered' traffic: 4 is a rather small buffer; (CHANNEL) maybe reserve more bits in 'options' to allow for buffer size control? diff --git a/src/cadet/gnunet-service-cadet-new_tunnels.c b/src/cadet/gnunet-service-cadet-new_tunnels.c index ff07ac665..a9f8dfffc 100644 --- a/src/cadet/gnunet-service-cadet-new_tunnels.c +++ b/src/cadet/gnunet-service-cadet-new_tunnels.c @@ -2712,6 +2712,11 @@ handle_plaintext_channel_open (void *cls, copen->ctn, &copen->port, ntohl (copen->opt)); + if (NULL != t->destroy_task) + { + GNUNET_SCHEDULER_cancel (t->destroy_task); + t->destroy_task = NULL; + } GNUNET_assert (GNUNET_OK == GNUNET_CONTAINER_multihashmap32_put (t->channels, ntohl (copen->ctn.cn), -- 2.25.1