projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a282416
)
Fixed an assert error when a client disconnects with open tunnels and without doing...
author
Bart Polot
<bart@net.in.tum.de>
Thu, 19 Jan 2012 11:06:37 +0000
(11:06 +0000)
committer
Bart Polot
<bart@net.in.tum.de>
Thu, 19 Jan 2012 11:06:37 +0000
(11:06 +0000)
src/mesh/gnunet-service-mesh.c
patch
|
blob
|
history
diff --git
a/src/mesh/gnunet-service-mesh.c
b/src/mesh/gnunet-service-mesh.c
index 08f72261148e61ef9504fc2a975ed139b62823d4..d871ee12d1b168aeba19fed6db31166fa315a584 100644
(file)
--- a/
src/mesh/gnunet-service-mesh.c
+++ b/
src/mesh/gnunet-service-mesh.c
@@
-411,6
+411,12
@@
struct MeshClient
*/
struct GNUNET_CONTAINER_MultiHashMap *types;
*/
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
#if MESH_DEBUG
/**
* ID of the client, for debug messages
@@
-912,7
+918,7
@@
send_clients_tunnel_destroy (struct MeshTunnel *t)
* notification. Otherwise, the origin gets a (local ID) peer disconnected.
*
* @param t Tunnel that was destroyed.
* 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)
*/
static void
send_client_tunnel_disconnect (struct MeshTunnel *t, struct MeshClient *c)
@@
-2123,7
+2129,7
@@
tunnel_send_multicast (struct MeshTunnel *t,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: not a data packet, no ttl\n");
#endif
}
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)) =
{
mdata->task = GNUNET_malloc (sizeof (GNUNET_SCHEDULER_TaskIdentifier));
(*(mdata->task)) =
@@
-3467,6
+3473,7
@@
handle_local_client_disconnect (void *cls, struct GNUNET_SERVER_Client *client)
c->id);
#endif
GNUNET_SERVER_client_drop (c->handle);
c->id);
#endif
GNUNET_SERVER_client_drop (c->handle);
+ c->shutting_down = GNUNET_YES;
if (NULL != c->tunnels)
{
GNUNET_CONTAINER_multihashmap_iterate (c->tunnels,
if (NULL != c->tunnels)
{
GNUNET_CONTAINER_multihashmap_iterate (c->tunnels,