gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r22946 - gnunet/src/mesh
Date: Fri, 27 Jul 2012 16:07:36 +0200

Author: bartpolot
Date: 2012-07-27 16:07:36 +0200 (Fri, 27 Jul 2012)
New Revision: 22946

Modified:
   gnunet/src/mesh/gnunet-service-mesh.c
   gnunet/src/mesh/mesh_api.c
Log:
- more debug msgs

Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c       2012-07-27 13:54:13 UTC (rev 
22945)
+++ gnunet/src/mesh/gnunet-service-mesh.c       2012-07-27 14:07:36 UTC (rev 
22946)
@@ -1879,6 +1879,7 @@
           struct GNUNET_MESH_TunnelNotification tmsg;
           struct GNUNET_HashCode hash;
 
+          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "     sending tunnel create\n");
           tmsg.header.size = htons (sizeof (tmsg));
           tmsg.header.type = htons 
(GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE);
           GNUNET_PEER_resolve (t->id.oid, &tmsg.peer);
@@ -1943,14 +1944,21 @@
   struct GNUNET_MESH_LocalAck msg;
   uint32_t ack;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Sending client ACK on tunnel %X\n",
+              t->local_tid);
   if (NULL == c)
     return;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " to client %u\n", c->id);
+
   ack = tunnel_get_ack (t);
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " ack %u\n", ack);
   if (t->last_ack == ack)
     return;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " sending!\n");
   t->last_ack = ack;
   msg.header.size = htons (sizeof (msg));
   msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_ACK);

Modified: gnunet/src/mesh/mesh_api.c
===================================================================
--- gnunet/src/mesh/mesh_api.c  2012-07-27 13:54:13 UTC (rev 22945)
+++ gnunet/src/mesh/mesh_api.c  2012-07-27 14:07:36 UTC (rev 22946)
@@ -1134,7 +1134,7 @@
 
   if (msg == NULL)
   {
-    LOG (GNUNET_ERROR_TYPE_DEBUG, "Received NULL msg\n");
+    LOG (GNUNET_ERROR_TYPE_DEBUG, "Received NULL msg on %p\n", h);
     reconnect (h);
     return;
   }
@@ -1205,7 +1205,7 @@
   LOG (GNUNET_ERROR_TYPE_DEBUG, "Send packet() Buffer %u\n", size);
   if ((0 == size) || (NULL == buf))
   {
-    LOG (GNUNET_ERROR_TYPE_DEBUG, "Received NULL send callback\n");
+    LOG (GNUNET_ERROR_TYPE_DEBUG, "Received NULL send callback on %p\n", h);
     reconnect (h);
     h->th = NULL;
     return 0;
@@ -1431,6 +1431,7 @@
 
   LOG (GNUNET_ERROR_TYPE_DEBUG, "GNUNET_MESH_connect()\n");
   h = GNUNET_malloc (sizeof (struct GNUNET_MESH_Handle));
+  LOG (GNUNET_ERROR_TYPE_DEBUG, " addr %p\n", h);
   h->cfg = cfg;
   h->new_tunnel = new_tunnel;
   h->cleaner = cleaner;
@@ -1941,6 +1942,7 @@
     LOG (GNUNET_ERROR_TYPE_DEBUG, "    target %s\n", GNUNET_i2s (target));
   else
     LOG (GNUNET_ERROR_TYPE_DEBUG, "    target multicast\n");
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "    payload size %u\n", notify_size);
   GNUNET_assert (NULL != notify);
   GNUNET_assert (0 == tunnel->packet_size); // Only one data packet allowed
   th = GNUNET_malloc (sizeof (struct GNUNET_MESH_TransmitHandle));
@@ -1954,11 +1956,13 @@
   else
     overhead = sizeof (struct GNUNET_MESH_Unicast);
   tunnel->packet_size = th->size = notify_size + overhead;
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "    total size %u\n", th->size);
   th->notify = notify;
   th->notify_cls = notify_cls;
   add_to_queue (tunnel->mesh, th);
   if (NULL != tunnel->mesh->th)
     return th;
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "    call notify tmt rdy\n");
   tunnel->mesh->th =
       GNUNET_CLIENT_notify_transmit_ready (tunnel->mesh->client, th->size,
                                            GNUNET_TIME_UNIT_FOREVER_REL,




reply via email to

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