gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r19217 - gnunet/src/mesh
Date: Tue, 17 Jan 2012 20:45:04 +0100

Author: bartpolot
Date: 2012-01-17 20:45:04 +0100 (Tue, 17 Jan 2012)
New Revision: 19217

Modified:
   gnunet/src/mesh/mesh_api.c
Log:
Added debug info for #2071

Modified: gnunet/src/mesh/mesh_api.c
===================================================================
--- gnunet/src/mesh/mesh_api.c  2012-01-17 19:39:52 UTC (rev 19216)
+++ gnunet/src/mesh/mesh_api.c  2012-01-17 19:45:04 UTC (rev 19217)
@@ -759,7 +759,6 @@
                         const struct GNUNET_MESH_TunnelNotification *msg)
 {
   struct GNUNET_MESH_Tunnel *t;
-  struct GNUNET_ATS_Information atsi;
   MESH_TunnelNumber tid;
 
   tid = ntohl (msg->tunnel_id);
@@ -780,10 +779,16 @@
   t->tid = tid;
   if (NULL != h->new_tunnel)
   {
+    struct GNUNET_ATS_Information atsi;
+
     atsi.type = 0;
     atsi.value = 0;
     t->ctx = h->new_tunnel (h->cls, t, &msg->peer, &atsi);
   }
+#if MESH_API_DEBUG
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: new incoming tunnel %u\n",
+              t->tid);
+#endif
   return;
 }
 
@@ -812,7 +817,9 @@
   {
     GNUNET_break (0);
   }
-
+#if MESH_API_DEBUG
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: tunnel %u destroyed\n", t->tid);
+#endif
   destroy_tunnel (t);
   return;
 }
@@ -911,6 +918,13 @@
   case GNUNET_MESSAGE_TYPE_MESH_MULTICAST:
     mcast = (struct GNUNET_MESH_Multicast *) message;
     t = retrieve_tunnel (h, ntohl (mcast->tid));
+#if MESH_API_DEBUG // FIXME debug for #2071
+    if (NULL == t)
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "mesh: tunnel %u unknown\n",
+                  ntohl (mcast->tid));
+    }
+#endif
     payload = (struct GNUNET_MessageHeader *) &mcast[1];
     peer = &mcast->oid;
     break;




reply via email to

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