From: Christian Grothoff Date: Tue, 31 Jan 2017 10:24:17 +0000 (+0100) Subject: cancel tunnel destruction if we get another channel during the grace period X-Git-Tag: taler-0.2.1~226 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3da2a8e83017cc13752c2865624ef8ae7e333afb;p=oweals%2Fgnunet.git cancel tunnel destruction if we get another channel during the grace period --- 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),