gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r15904 - gnunet/src/peerinfo-tool


From: gnunet
Subject: [GNUnet-SVN] r15904 - gnunet/src/peerinfo-tool
Date: Fri, 8 Jul 2011 19:11:25 +0200

Author: nevans
Date: 2011-07-08 19:11:25 +0200 (Fri, 08 Jul 2011)
New Revision: 15904

Modified:
   gnunet/src/peerinfo-tool/gnunet-list-connections.c
Log:
debug flag

Modified: gnunet/src/peerinfo-tool/gnunet-list-connections.c
===================================================================
--- gnunet/src/peerinfo-tool/gnunet-list-connections.c  2011-07-08 17:10:45 UTC 
(rev 15903)
+++ gnunet/src/peerinfo-tool/gnunet-list-connections.c  2011-07-08 17:11:25 UTC 
(rev 15904)
@@ -32,8 +32,12 @@
 #include "gnunet_core_service.h"
 #include "gnunet_program_lib.h"
 
+#define VERBOSE 0
 static int no_resolve;
 
+#if VERBOSE
+  static unsigned int peer_count;
+#endif
 
 static const struct GNUNET_CONFIGURATION_Handle *cfg;
 
@@ -127,6 +131,7 @@
     {
 #if VERBOSE
       fprintf(stderr, "Learned about peer %s\n", GNUNET_i2s(peer));
+      peer_count++;
 #endif
       pc = GNUNET_malloc (sizeof (struct PrintContext));
       pc->peer = *peer;
@@ -134,6 +139,12 @@
                                             GNUNET_TIME_UNIT_MINUTES,
                                             &process_resolved_address, pc);
     }
+#if VERBOSE
+  else
+    {
+      fprintf(stderr, "Counted %u total connected peers.\n", peer_count);
+    }
+#endif
 }
 
 




reply via email to

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