[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r19260 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r19260 - gnunet/src/mesh |
Date: |
Thu, 19 Jan 2012 16:20:17 +0100 |
Author: bartpolot
Date: 2012-01-19 16:20:17 +0100 (Thu, 19 Jan 2012)
New Revision: 19260
Modified:
gnunet/src/mesh/gnunet-service-mesh.c
Log:
Fixed client disconnect bug, delimited debug messages.
Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c 2012-01-19 14:50:40 UTC (rev
19259)
+++ gnunet/src/mesh/gnunet-service-mesh.c 2012-01-19 15:20:17 UTC (rev
19260)
@@ -2200,6 +2200,7 @@
if (NULL == t)
return GNUNET_OK;
+ r = GNUNET_OK;
c = t->client;
#if MESH_DEBUG
{
@@ -2218,13 +2219,20 @@
{
r = GNUNET_SYSERR;
}
-
+
GNUNET_CRYPTO_hash (&t->local_tid, sizeof (MESH_TunnelNumber), &hash);
if (NULL != c &&
GNUNET_YES != GNUNET_CONTAINER_multihashmap_remove (c->tunnels, &hash,
t))
{
r = GNUNET_SYSERR;
}
+ c = t->client_dest;
+ GNUNET_CRYPTO_hash (&t->local_tid_dest, sizeof (MESH_TunnelNumber), &hash);
+ if (NULL != c &&
+ GNUNET_YES != GNUNET_CONTAINER_multihashmap_remove (c->tunnels, &hash,
t))
+ {
+ r = GNUNET_SYSERR;
+ }
if (t->local_tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV)
{
GNUNET_CRYPTO_hash (&t->local_tid, sizeof (MESH_TunnelNumber), &hash);
@@ -2296,6 +2304,10 @@
send_client_tunnel_disconnect(t, c);
if (c == t->client_dest)
{
+#if MESH_DEBUG
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Client %u is destination, keeping the tunnel alive.\n",
c->id);
+#endif
t->client_dest = NULL;
t->local_tid_dest = 0;
return GNUNET_OK;
@@ -3453,7 +3465,9 @@
struct MeshClient *c;
struct MeshClient *next;
+#if MESH_DEBUG
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: client disconnected\n");
+#endif
if (client == NULL)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: (SERVER DOWN)\n");
@@ -3464,7 +3478,9 @@
{
if (c->handle != client)
{
+#if MESH_DEBUG
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: ... searching\n");
+#endif
c = c->next;
continue;
}
@@ -3497,12 +3513,16 @@
GNUNET_CONTAINER_multihashmap_destroy (c->types);
next = c->next;
GNUNET_CONTAINER_DLL_remove (clients, clients_tail, c);
+#if MESH_DEBUG
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: CLIENT FREE at %p\n", c);
+#endif
GNUNET_free (c);
c = next;
}
+#if MESH_DEBUG
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: done!\n");
+#endif
return;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r19260 - gnunet/src/mesh,
gnunet <=