gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r33041 - gnunet/src/mesh
Date: Fri, 11 Apr 2014 17:30:35 +0200

Author: bartpolot
Date: 2014-04-11 17:30:35 +0200 (Fri, 11 Apr 2014)
New Revision: 33041

Modified:
   gnunet/src/mesh/gnunet-service-mesh_peer.c
Log:
- add debug function to inspect queues

Modified: gnunet/src/mesh/gnunet-service-mesh_peer.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_peer.c  2014-04-11 15:30:34 UTC (rev 
33040)
+++ gnunet/src/mesh/gnunet-service-mesh_peer.c  2014-04-11 15:30:35 UTC (rev 
33041)
@@ -212,11 +212,34 @@
  */
 static struct GNUNET_TRANSPORT_Handle *transport_handle;
 
+
 
/******************************************************************************/
-/***************************** CORE CALLBACKS 
*********************************/
+/*****************************     DEBUG      
*********************************/
 
/******************************************************************************/
 
+static void
+queue_debug (struct MeshPeer *peer)
+{
+  struct MeshPeerQueue *q;
 
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "Messages queued towards %s\n", GMP_2s (peer));
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "  core tmt rdy: %p\n", peer->core_transmit);
+
+  for (q = peer->queue_head; NULL != q; q = q->next)
+  {
+    LOG (GNUNET_ERROR_TYPE_DEBUG, "  - %s %s on %s\n",
+         GM_m2s (q->type), GM_f2s (q->fwd), GMC_2s (q->c));
+  }
+
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "End queued towards %s\n", GMP_2s (peer));
+}
+
+
+/******************************************************************************/
+/*****************************  CORE HELPERS  
*********************************/
+/******************************************************************************/
+
+
 /**
  * Iterator to notify all connections of a broken link. Mark connections
  * to destroy after all traffic has been sent.
@@ -266,6 +289,9 @@
 }
 
 
+/******************************************************************************/
+/***************************** CORE CALLBACKS 
*********************************/
+/******************************************************************************/
 
 /**
  * Method called whenever a given peer connects.
@@ -411,6 +437,7 @@
   return;
 }
 
+
 /**
   * Core callback to write a pre-constructed data packet to core buffer
   *




reply via email to

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