[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r21490 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r21490 - gnunet/src/transport |
Date: |
Tue, 15 May 2012 10:09:16 +0200 |
Author: wachs
Date: 2012-05-15 10:09:16 +0200 (Tue, 15 May 2012)
New Revision: 21490
Modified:
gnunet/src/transport/gnunet-service-transport_neighbours.c
Log:
fix for mantis 2355
Modified: gnunet/src/transport/gnunet-service-transport_neighbours.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_neighbours.c 2012-05-15
00:58:27 UTC (rev 21489)
+++ gnunet/src/transport/gnunet-service-transport_neighbours.c 2012-05-15
08:09:16 UTC (rev 21490)
@@ -795,9 +795,6 @@
struct MessageQueue *mq;
struct GNUNET_TRANSPORT_PluginFunctions *papi;
- GNUNET_assert (GNUNET_YES ==
- GNUNET_CONTAINER_multihashmap_remove (neighbours,
- &n->id.hashPubKey, n));
n->is_active = NULL; /* always free'd by its own continuation! */
/* fail messages currently in the queue */
@@ -818,7 +815,6 @@
GNUNET_NO);
disconnect_notify_cb (callback_cls, &n->id);
}
- n->state = S_DISCONNECT_FINISHED;
/* FIXME-PLUGIN-API: This does not seem to guarantee that all
transport sessions eventually get killed due to inactivity; they
@@ -833,6 +829,12 @@
(NULL != (papi = GST_plugins_find
(n->primary_address.address->transport_name))) )
papi->disconnect (papi->cls, &n->id);
+ 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);
@@ -1054,6 +1056,12 @@
struct NeighbourMapEntry *n;
n = lookup_neighbour (receiver);
+ if (NULL == n)
+ {
+ GNUNET_break (0);
+ return;
+ }
+
if (n->is_active == mq)
{
/* this is still "our" neighbour, remove us from its queue
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r21490 - gnunet/src/transport,
gnunet <=