diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-06-29 16:48:14 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-06-29 16:48:14 +0000 |
commit | 4e7763ad831a02b412b538da2680cf07b77a5458 (patch) | |
tree | 0177132cce5bd7faa64bf6b688246adb4894a87e /src/transport/gnunet-service-transport_neighbours.c | |
parent | 550d51f9db6905f0a28113b075020109fe38b6f0 (diff) | |
download | gnunet-4e7763ad831a02b412b538da2680cf07b77a5458.tar.gz gnunet-4e7763ad831a02b412b538da2680cf07b77a5458.zip |
- " undo"
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.c')
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 1c693fd4a..23c8bdb35 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -870,7 +870,7 @@ free_neighbour (struct NeighbourMapEntry *n, int keep_sessions) | |||
870 | { | 870 | { |
871 | struct MessageQueue *mq; | 871 | struct MessageQueue *mq; |
872 | struct GNUNET_TRANSPORT_PluginFunctions *papi; | 872 | struct GNUNET_TRANSPORT_PluginFunctions *papi; |
873 | struct GNUNET_HELLO_Address *old_address; | 873 | //struct GNUNET_HELLO_Address *old_address; |
874 | 874 | ||
875 | n->is_active = NULL; /* always free'd by its own continuation! */ | 875 | n->is_active = NULL; /* always free'd by its own continuation! */ |
876 | 876 | ||
@@ -895,9 +895,9 @@ free_neighbour (struct NeighbourMapEntry *n, int keep_sessions) | |||
895 | 895 | ||
896 | 896 | ||
897 | /* cut transport-level connection */ | 897 | /* cut transport-level connection */ |
898 | old_address = GNUNET_HELLO_address_copy(n->primary_address.address); | 898 | //old_address = GNUNET_HELLO_address_copy(n->primary_address.address); |
899 | free_address (&n->primary_address); | 899 | |
900 | free_address (&n->alternative_address); | 900 | |
901 | 901 | ||
902 | /* FIXME-PLUGIN-API: This does not seem to guarantee that all | 902 | /* FIXME-PLUGIN-API: This does not seem to guarantee that all |
903 | transport sessions eventually get killed due to inactivity; they | 903 | transport sessions eventually get killed due to inactivity; they |
@@ -910,14 +910,16 @@ free_neighbour (struct NeighbourMapEntry *n, int keep_sessions) | |||
910 | wrong. */ | 910 | wrong. */ |
911 | 911 | ||
912 | if ((GNUNET_NO == keep_sessions) && | 912 | if ((GNUNET_NO == keep_sessions) && |
913 | (NULL != old_address) && | 913 | (NULL != n->primary_address.address) && |
914 | (NULL != (papi = GST_plugins_find (old_address->transport_name)))) | 914 | (NULL != (papi = GST_plugins_find (n->primary_address.address->transport_name)))) |
915 | papi->disconnect (papi->cls, &n->id); | 915 | papi->disconnect (papi->cls, &n->id); |
916 | 916 | ||
917 | GNUNET_free (old_address); | ||
918 | 917 | ||
919 | n->state = S_DISCONNECT_FINISHED; | 918 | n->state = S_DISCONNECT_FINISHED; |
920 | 919 | ||
920 | free_address (&n->primary_address); | ||
921 | free_address (&n->alternative_address); | ||
922 | |||
921 | GNUNET_assert (GNUNET_YES == | 923 | GNUNET_assert (GNUNET_YES == |
922 | GNUNET_CONTAINER_multihashmap_remove (neighbours, | 924 | GNUNET_CONTAINER_multihashmap_remove (neighbours, |
923 | &n->id.hashPubKey, n)); | 925 | &n->id.hashPubKey, n)); |