aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_neighbours.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.c')
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index a55e6a07d..a3b5639a0 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -817,6 +817,7 @@ set_address (struct NeighbourAddress *na,
817 int is_active) 817 int is_active)
818{ 818{
819 struct GNUNET_TRANSPORT_PluginFunctions *papi; 819 struct GNUNET_TRANSPORT_PluginFunctions *papi;
820
820 if (NULL == (papi = GST_plugins_find (address->transport_name))) 821 if (NULL == (papi = GST_plugins_find (address->transport_name)))
821 { 822 {
822 GNUNET_break (0); 823 GNUNET_break (0);
@@ -918,13 +919,8 @@ free_neighbour (struct NeighbourMapEntry *n, int keep_sessions)
918 free_address (&n->primary_address); 919 free_address (&n->primary_address);
919 free_address (&n->alternative_address); 920 free_address (&n->alternative_address);
920 921
921 /* FIXME-PLUGIN-API: This does not seem to guarantee that all 922 /* FIXME: Note that if we are switching between two TCP sessions to
922 transport sessions eventually get killed due to inactivity; they 923 the same peer, we might want to selectively kill only one of
923 MUST have their own timeout logic (but at least TCP doesn't have
924 one yet). Are we sure that EVERY 'session' of a plugin is
925 actually cleaned up this way!? Note that if we are switching
926 between two TCP sessions to the same peer, the existing plugin
927 API gives us not even the means to selectively kill only one of
928 them! Killing all sessions like this seems to be very, very 924 them! Killing all sessions like this seems to be very, very
929 wrong. */ 925 wrong. */
930 926
@@ -932,7 +928,7 @@ free_neighbour (struct NeighbourMapEntry *n, int keep_sessions)
932 if ((GNUNET_NO == keep_sessions) && 928 if ((GNUNET_NO == keep_sessions) &&
933 (NULL != backup_primary) && 929 (NULL != backup_primary) &&
934 (NULL != (papi = GST_plugins_find (backup_primary->transport_name)))) 930 (NULL != (papi = GST_plugins_find (backup_primary->transport_name))))
935 papi->disconnect (papi->cls, &n->id); 931 papi->disconnect_peer (papi->cls, &n->id);
936 932
937 GNUNET_free_non_null (backup_primary); 933 GNUNET_free_non_null (backup_primary);
938 934