LRN: Call-transport-disconnect-to-clear-session-message-q.patch:
authorChristian Grothoff <christian@grothoff.org>
Sat, 5 Nov 2011 14:46:54 +0000 (14:46 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 5 Nov 2011 14:46:54 +0000 (14:46 +0000)
This was submitted to #1880, but i'm including this here as well.

src/transport/gnunet-service-transport_neighbours.c

index e0af12b3c9b7a2dec562e36ffe6a6649e9398614..14987d6dea6cf84d03f95ccb87f67b8edc03ff5a 100644 (file)
@@ -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);