From b730f77294aaaff4761e42804deda8c22caf4771 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 5 Nov 2011 14:46:54 +0000 Subject: [PATCH] LRN: Call-transport-disconnect-to-clear-session-message-q.patch: This was submitted to #1880, but i'm including this here as well. --- src/transport/gnunet-service-transport_neighbours.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index e0af12b3c..14987d6de 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c @@ -862,6 +862,14 @@ disconnect_neighbour (struct NeighbourMapEntry *n) return; change_state (n, S_DISCONNECT); + if (n->plugin_name != NULL) + { + struct GNUNET_TRANSPORT_PluginFunctions *papi; + papi = GST_plugins_find (n->plugin_name); + if (papi != NULL) + papi->disconnect (papi->cls, &n->id); + } + while (NULL != (mq = n->messages_head)) { GNUNET_CONTAINER_DLL_remove (n->messages_head, n->messages_tail, mq); -- 2.25.1