diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-05-28 13:00:56 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-05-28 13:00:56 +0000 |
commit | 7ba9eb10f99594e5a4bf5a27c4c4747fbd8cc88c (patch) | |
tree | 661cdbb574ac1e659fe13fe186c9623464de0e61 /src/transport/gnunet-service-transport_neighbours.c | |
parent | 512b8906c4db59835deeef1b061aa58629f988bb (diff) | |
download | gnunet-7ba9eb10f99594e5a4bf5a27c4c4747fbd8cc88c.tar.gz gnunet-7ba9eb10f99594e5a4bf5a27c4c4747fbd8cc88c.zip |
-fix kill logic (#2381), interpretation of flag was inverted
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.c')
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 1c7cc9f59..59132bddc 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -847,10 +847,11 @@ set_address (struct NeighbourAddress *na, | |||
847 | * Free a neighbour map entry. | 847 | * Free a neighbour map entry. |
848 | * | 848 | * |
849 | * @param n entry to free | 849 | * @param n entry to free |
850 | * @param terminate tell plugin to terminate sessions | 850 | * @param keep_sessions GNUNET_NO to tell plugin to terminate sessions, |
851 | * GNUNET_YES to keep all sessions | ||
851 | */ | 852 | */ |
852 | static void | 853 | static void |
853 | free_neighbour (struct NeighbourMapEntry *n, int terminate) | 854 | free_neighbour (struct NeighbourMapEntry *n, int keep_sessions) |
854 | { | 855 | { |
855 | struct MessageQueue *mq; | 856 | struct MessageQueue *mq; |
856 | struct GNUNET_TRANSPORT_PluginFunctions *papi; | 857 | struct GNUNET_TRANSPORT_PluginFunctions *papi; |
@@ -885,7 +886,7 @@ free_neighbour (struct NeighbourMapEntry *n, int terminate) | |||
885 | API gives us not even the means to selectively kill only one of | 886 | API gives us not even the means to selectively kill only one of |
886 | them! Killing all sessions like this seems to be very, very | 887 | them! Killing all sessions like this seems to be very, very |
887 | wrong. */ | 888 | wrong. */ |
888 | if ((GNUNET_YES == terminate) && | 889 | if ((GNUNET_NO == keep_sessions) && |
889 | (NULL != n->primary_address.address) && | 890 | (NULL != n->primary_address.address) && |
890 | (NULL != (papi = GST_plugins_find (n->primary_address.address->transport_name)))) | 891 | (NULL != (papi = GST_plugins_find (n->primary_address.address->transport_name)))) |
891 | papi->disconnect (papi->cls, &n->id); | 892 | papi->disconnect (papi->cls, &n->id); |