-fix kill logic (#2381), interpretation of flag was inverted
authorChristian Grothoff <christian@grothoff.org>
Mon, 28 May 2012 13:00:56 +0000 (13:00 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 28 May 2012 13:00:56 +0000 (13:00 +0000)
src/transport/gnunet-service-transport_neighbours.c

index 1c7cc9f59df09e4907966bb6586fc68248d0779a..59132bddc266fccf048c73c0d6f0cdae18455160 100644 (file)
@@ -847,10 +847,11 @@ set_address (struct NeighbourAddress *na,
  * Free a neighbour map entry.
  *
  * @param n entry to free
- * @param terminate tell plugin to terminate sessions
+ * @param keep_sessions GNUNET_NO to tell plugin to terminate sessions,
+ *                      GNUNET_YES to keep all sessions
  */
 static void
-free_neighbour (struct NeighbourMapEntry *n, int terminate)
+free_neighbour (struct NeighbourMapEntry *n, int keep_sessions)
 {
   struct MessageQueue *mq;
   struct GNUNET_TRANSPORT_PluginFunctions *papi;
@@ -885,7 +886,7 @@ free_neighbour (struct NeighbourMapEntry *n, int terminate)
      API gives us not even the means to selectively kill only one of
      them! Killing all sessions like this seems to be very, very
      wrong. */
-  if ((GNUNET_YES == terminate) &&
+  if ((GNUNET_NO == keep_sessions) &&
       (NULL != n->primary_address.address) &&
       (NULL != (papi = GST_plugins_find (n->primary_address.address->transport_name))))
     papi->disconnect (papi->cls, &n->id);