gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r31455 - gnunet/src/mesh
Date: Tue, 17 Dec 2013 02:15:34 +0100

Author: bartpolot
Date: 2013-12-17 02:15:34 +0100 (Tue, 17 Dec 2013)
New Revision: 31455

Modified:
   gnunet/src/mesh/gnunet-service-mesh_connection.c
   gnunet/src/mesh/gnunet-service-mesh_local.c
   gnunet/src/mesh/gnunet-service-mesh_tunnel.c
Log:
- debug info


Modified: gnunet/src/mesh/gnunet-service-mesh_connection.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_connection.c    2013-12-17 00:28:20 UTC 
(rev 31454)
+++ gnunet/src/mesh/gnunet-service-mesh_connection.c    2013-12-17 01:15:34 UTC 
(rev 31455)
@@ -446,16 +446,17 @@
   /* If origin, there is no connection to send ACKs. Wrong function! */
   if (GMC_is_origin (c, fwd))
   {
-    GNUNET_break (0);
+    LOG (GNUNET_ERROR_TYPE_DEBUG, "connection %s is origin in %s\n",
+         GMC_2s (c), GM_f2s (fwd));
+    GNUNET_assert (0);
     return;
   }
 
   next_fc = fwd ? &c->fwd_fc : &c->bck_fc;
   prev_fc = fwd ? &c->bck_fc : &c->fwd_fc;
 
-  LOG (GNUNET_ERROR_TYPE_DEBUG,
-              "connection send %s ack on %s\n",
-              GM_f2s (fwd), GMC_2s (c));
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "connection send %s ack on %s\n",
+       GM_f2s (fwd), GMC_2s (c));
 
   /* Check if we need to transmit the ACK. */
   delta = prev_fc->last_ack_sent - prev_fc->last_pid_recv;
@@ -2471,6 +2472,8 @@
 void
 GMC_allow (struct MeshConnection *c, unsigned int buffer, int fwd)
 {
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "  allowing %s %u messages %s\n",
+       GMC_2s (c), buffer, GM_f2s (fwd));
   send_ack (c, buffer, fwd, GNUNET_NO);
 }
 

Modified: gnunet/src/mesh/gnunet-service-mesh_local.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_local.c 2013-12-17 00:28:20 UTC (rev 
31454)
+++ gnunet/src/mesh/gnunet-service-mesh_local.c 2013-12-17 01:15:34 UTC (rev 
31455)
@@ -534,7 +534,8 @@
   MESH_ChannelNumber chid;
   int fwd;
 
-  LOG (GNUNET_ERROR_TYPE_DEBUG, "\n\nGot a local ACK\n");
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "\n");
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "Got a local ACK\n");
 
   /* Sanity check for client registration */
   if (NULL == (c = GML_client_get (client)))

Modified: gnunet/src/mesh/gnunet-service-mesh_tunnel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_tunnel.c        2013-12-17 00:28:20 UTC 
(rev 31454)
+++ gnunet/src/mesh/gnunet-service-mesh_tunnel.c        2013-12-17 01:15:34 UTC 
(rev 31455)
@@ -1150,7 +1150,7 @@
   {
     GNUNET_STATISTICS_update (stats, "# data on unknown channel",
                               1, GNUNET_NO);
-    LOG (GNUNET_ERROR_TYPE_DEBUG, "WARNING channel %u unknown\n",
+    LOG (GNUNET_ERROR_TYPE_DEBUG, "WARNING channel %X unknown\n",
          ntohl (msg->chid));
     return;
   }
@@ -2291,8 +2291,7 @@
   unsigned int cs;
   unsigned int buffer;
 
-  LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Tunnel send connection ACKs on %s\n",
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "Tunnel send connection ACKs on %s\n",
        GMT_2s (t));
 
   if (NULL == t)
@@ -2302,6 +2301,7 @@
   }
 
   buffer = GMT_get_channels_buffer (t);
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "  buffer %u\n", buffer);
 
   /* Count connections, how many messages are already allowed */
   cs = GMT_count_connections (t);
@@ -2309,6 +2309,7 @@
   {
     allowed += get_connection_allowed (iter);
   }
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "  allowed %u\n", allowed);
 
   /* Make sure there is no overflow */
   if (allowed > buffer)
@@ -2328,7 +2329,8 @@
     {
       continue;
     }
-    GMC_allow (iter->c, buffer, GMC_is_origin (iter->c, GNUNET_YES));
+    GMC_allow (iter->c, allow_per_connection,
+               GMC_is_origin (iter->c, GNUNET_YES));
   }
 
   GNUNET_break (to_allow == 0);




reply via email to

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