From 6f8fabef01d53234928a2c766fe19b0bbb00a2a2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 18 Feb 2017 20:02:21 +0100 Subject: [PATCH] make sure after any transmission succeeds we continue looking for more (previous code missed some corner cases, see #4896/11780) --- src/cadet/gnunet-service-cadet-new_core.c | 1 - src/cadet/gnunet-service-cadet-new_peer.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/cadet/gnunet-service-cadet-new_core.c b/src/cadet/gnunet-service-cadet-new_core.c index 05fe5f49f..3768c36a5 100644 --- a/src/cadet/gnunet-service-cadet-new_core.c +++ b/src/cadet/gnunet-service-cadet-new_core.c @@ -596,7 +596,6 @@ send_broken (struct RouteDirection *target, bm->peer1 = *peer1; if (NULL != peer2) bm->peer2 = *peer2; - GCP_request_mq_cancel (target->mqm, env); target->mqm = NULL; diff --git a/src/cadet/gnunet-service-cadet-new_peer.c b/src/cadet/gnunet-service-cadet-new_peer.c index 136ab8297..7b944afd8 100644 --- a/src/cadet/gnunet-service-cadet-new_peer.c +++ b/src/cadet/gnunet-service-cadet-new_peer.c @@ -1398,10 +1398,17 @@ GCP_request_mq_cancel (struct GCP_MessageQueueManager *mqm, if (NULL != last_env) { if (NULL != cp->core_mq) + { + GNUNET_MQ_notify_sent (last_env, + &mqm_send_done, + cp); GNUNET_MQ_send (cp->core_mq, last_env); + } else + { GNUNET_MQ_discard (last_env); + } } if (cp->mqm_ready_ptr == mqm) cp->mqm_ready_ptr = mqm->next; @@ -1433,6 +1440,9 @@ GCP_send_ooo (struct CadetPeer *cp, GNUNET_MQ_discard (env); return; } + GNUNET_MQ_notify_sent (env, + &mqm_send_done, + cp); GNUNET_MQ_send (cp->core_mq, env); } -- 2.25.1