[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r19253 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r19253 - gnunet/src/mesh |
Date: |
Thu, 19 Jan 2012 12:06:37 +0100 |
Author: bartpolot
Date: 2012-01-19 12:06:37 +0100 (Thu, 19 Jan 2012)
New Revision: 19253
Modified:
gnunet/src/mesh/gnunet-service-mesh.c
Log:
Fixed an assert error when a client disconnects with open tunnels and without
doing MESH_disconnect
Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c 2012-01-19 10:58:20 UTC (rev
19252)
+++ gnunet/src/mesh/gnunet-service-mesh.c 2012-01-19 11:06:37 UTC (rev
19253)
@@ -411,6 +411,12 @@
*/
struct GNUNET_CONTAINER_MultiHashMap *types;
+ /**
+ * Whether the client is active or shutting down (don't send confirmations
+ * to a client that is shutting down.
+ */
+ int shutting_down;
+
#if MESH_DEBUG
/**
* ID of the client, for debug messages
@@ -912,7 +918,7 @@
* notification. Otherwise, the origin gets a (local ID) peer disconnected.
*
* @param t Tunnel that was destroyed.
- * @param c Client that disconnected
+ * @param c Client that disconnected.
*/
static void
send_client_tunnel_disconnect (struct MeshTunnel *t, struct MeshClient *c)
@@ -2123,7 +2129,7 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: not a data packet, no
ttl\n");
#endif
}
- if (NULL != t->client)
+ if (NULL != t->client && GNUNET_YES != t->client->shutting_down)
{
mdata->task = GNUNET_malloc (sizeof (GNUNET_SCHEDULER_TaskIdentifier));
(*(mdata->task)) =
@@ -3467,6 +3473,7 @@
c->id);
#endif
GNUNET_SERVER_client_drop (c->handle);
+ c->shutting_down = GNUNET_YES;
if (NULL != c->tunnels)
{
GNUNET_CONTAINER_multihashmap_iterate (c->tunnels,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r19253 - gnunet/src/mesh,
gnunet <=