From cb9168b83eb4a3a15c8ca761446789fb980295a7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 31 Jan 2017 19:09:57 +0100 Subject: [PATCH] stop destroy task if connection goes up --- src/cadet/TODO | 2 -- src/cadet/gnunet-service-cadet-new_peer.c | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cadet/TODO b/src/cadet/TODO index 03bf6eae1..820efab7a 100644 --- a/src/cadet/TODO +++ b/src/cadet/TODO @@ -1,7 +1,6 @@ - URGENT: Congestion/flow control (CHANNEL): + estimate max bandwidth using bursts and use to for CONGESTION CONTROL! (and figure out how/where to use this!) - + figure out flow control without ACKs (unreliable traffic!) - HIGH: revisit handling of 'unbuffered' traffic! (CHANNEL/TUNNEL) (need to push down through tunnel into connection selection); @@ -20,7 +19,6 @@ point of breakage) as well as connection/route (CORE) - OPTIMIZATION: proper connection evaluation during connection management: - + PATHS: path desirability score calculations are not done + TUNNELS: * consider quality of current connection set when deciding how often to do maintenance diff --git a/src/cadet/gnunet-service-cadet-new_peer.c b/src/cadet/gnunet-service-cadet-new_peer.c index d9a87600b..539b04460 100644 --- a/src/cadet/gnunet-service-cadet-new_peer.c +++ b/src/cadet/gnunet-service-cadet-new_peer.c @@ -1011,6 +1011,11 @@ GCP_add_connection (struct CadetPeer *cp, &GCC_get_id (cc)->connection_of_tunnel, cc, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); + if (NULL != cp->destroy_task) + { + GNUNET_SCHEDULER_cancel (cp->destroy_task); + cp->destroy_task = NULL; + } } @@ -1032,6 +1037,7 @@ GCP_remove_connection (struct CadetPeer *cp, GNUNET_CONTAINER_multishortmap_remove (cp->connections, &GCC_get_id (cc)->connection_of_tunnel, cc)); + consider_peer_destroy (cp); } -- 2.25.1