[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22394 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22394 - gnunet/src/transport |
Date: |
Fri, 29 Jun 2012 18:43:11 +0200 |
Author: wachs
Date: 2012-06-29 18:43:11 +0200 (Fri, 29 Jun 2012)
New Revision: 22394
Modified:
gnunet/src/transport/gnunet-service-transport_neighbours.c
Log:
fix for mantis 2445
Modified: gnunet/src/transport/gnunet-service-transport_neighbours.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_neighbours.c 2012-06-29
15:55:08 UTC (rev 22393)
+++ gnunet/src/transport/gnunet-service-transport_neighbours.c 2012-06-29
16:43:11 UTC (rev 22394)
@@ -870,6 +870,7 @@
{
struct MessageQueue *mq;
struct GNUNET_TRANSPORT_PluginFunctions *papi;
+ struct GNUNET_HELLO_Address *old_address;
n->is_active = NULL; /* always free'd by its own continuation! */
@@ -892,6 +893,12 @@
disconnect_notify_cb (callback_cls, &n->id);
}
+
+ /* cut transport-level connection */
+ old_address = GNUNET_HELLO_address_copy(n->primary_address.address);
+ free_address (&n->primary_address);
+ free_address (&n->alternative_address);
+
/* FIXME-PLUGIN-API: This does not seem to guarantee that all
transport sessions eventually get killed due to inactivity; they
MUST have their own timeout logic (but at least TCP doesn't have
@@ -901,21 +908,20 @@
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_NO == keep_sessions) &&
- (NULL != n->primary_address.address) &&
- (NULL != (papi = GST_plugins_find
(n->primary_address.address->transport_name))))
+ (NULL != old_address) &&
+ (NULL != (papi = GST_plugins_find (old_address->transport_name))))
papi->disconnect (papi->cls, &n->id);
+ GNUNET_free (old_address);
+
n->state = S_DISCONNECT_FINISHED;
GNUNET_assert (GNUNET_YES ==
GNUNET_CONTAINER_multihashmap_remove (neighbours,
&n->id.hashPubKey, n));
- /* cut transport-level connection */
- free_address (&n->primary_address);
- free_address (&n->alternative_address);
-
// FIXME-ATS-API: we might want to be more specific about
// which states we do this from in the future (ATS should
// have given us a 'suggest_address' handle, and if we have
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22394 - gnunet/src/transport,
gnunet <=