make sure after any transmission succeeds we continue looking for more (previous...
authorChristian Grothoff <christian@grothoff.org>
Sat, 18 Feb 2017 19:02:21 +0000 (20:02 +0100)
committerChristian Grothoff <christian@grothoff.org>
Sat, 18 Feb 2017 19:02:21 +0000 (20:02 +0100)
src/cadet/gnunet-service-cadet-new_core.c
src/cadet/gnunet-service-cadet-new_peer.c

index 05fe5f49f56f1d9fbc28c935383bcf1a9a8083d2..3768c36a56323312eb4db01400134a2ee8393f07 100644 (file)
@@ -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;
index 136ab829780f0e7bca801236efe7c1d6d1af6d3c..7b944afd845f94183d16f035098cd00fc57bf459 100644 (file)
@@ -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);
 }