gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r28237 - gnunet/src/mesh


From: gnunet
Subject: [GNUnet-SVN] r28237 - gnunet/src/mesh
Date: Mon, 22 Jul 2013 15:02:59 +0200

Author: bartpolot
Date: 2013-07-22 15:02:59 +0200 (Mon, 22 Jul 2013)
New Revision: 28237

Modified:
   gnunet/src/mesh/gnunet-service-mesh.c
Log:
- allow same owner && client

Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c       2013-07-22 12:12:24 UTC (rev 
28236)
+++ gnunet/src/mesh/gnunet-service-mesh.c       2013-07-22 13:02:59 UTC (rev 
28237)
@@ -5038,7 +5038,7 @@
 
   /* Retrieve tunnel */
   tid = ntohl (tunnel_msg->tunnel_id);
-  t = tunnel_get_by_local_id(c, tid);
+  t = tunnel_get_by_local_id (c, tid);
   if (NULL == t)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "  tunnel %X not found\n", tid);
@@ -5049,15 +5049,22 @@
 
   /* Cleanup after the tunnel */
   client_delete_tunnel (c, t);
-  if (c == t->client)
+  if (c == t->client && GNUNET_MESH_LOCAL_TUNNEL_ID_SERV >= tid)
   {
     t->client = NULL;
   }
-  if (c == t->owner)
+  else if (c == t->owner && GNUNET_MESH_LOCAL_TUNNEL_ID_SERV < tid)
   {
     peer_info_remove_tunnel (peer_get_short (t->dest), t);
     t->owner = NULL;
   }
+  else 
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "  tunnel %X client %p (%p, %p)\n",
+                tid, c, t->owner, t->client);
+    GNUNET_break (0);
+  }
 
   /* The tunnel will be destroyed when the last message is transmitted. */
   tunnel_destroy_empty (t);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]