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 */
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
(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);
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