gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r16304 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r16304 - gnunet/src/transport
Date: Mon, 1 Aug 2011 22:57:40 +0200

Author: grothoff
Date: 2011-08-01 22:57:40 +0200 (Mon, 01 Aug 2011)
New Revision: 16304

Modified:
   gnunet/src/transport/test_quota_compliance.c
Log:
a bit cleanr

Modified: gnunet/src/transport/test_quota_compliance.c
===================================================================
--- gnunet/src/transport/test_quota_compliance.c        2011-08-01 20:55:56 UTC 
(rev 16303)
+++ gnunet/src/transport/test_quota_compliance.c        2011-08-01 20:57:40 UTC 
(rev 16304)
@@ -303,10 +303,11 @@
       ret += sizeof (struct TestMessage);
       memset (&cbuf[ret], last_msg_sent, s - sizeof (struct TestMessage));
       ret += s - sizeof (struct TestMessage);
-
+#if DEBUG_MEASUREMENT
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "Sending message %u\n",last_msg_sent);
-
+                  "Sending message %u\n",
+                 last_msg_sent);
+#endif
       s = get_size ();
       if (0 == GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 16))
        break; /* sometimes pack buffer full, sometimes not */
@@ -554,10 +555,12 @@
   struct PeerContext *me = cls;
 
   GNUNET_assert (message != NULL);
+#if DEBUG_CONNECTIONS
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Exchanging HELLO of size %d with peer (%s)!\n", 
              (int) GNUNET_HELLO_size((const struct GNUNET_HELLO_Message 
*)message),
              GNUNET_i2s (&me->id));
+#endif
   GNUNET_assert (GNUNET_OK ==
                  GNUNET_HELLO_get_id ((const struct GNUNET_HELLO_Message *)
                                       message, &me->id));
@@ -576,10 +579,12 @@
   GNUNET_assert (GNUNET_OK ==
                  GNUNET_HELLO_get_id ((const struct GNUNET_HELLO_Message *)
                                       message, &me->id));
+#if DEBUG_CONNECTIONS
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Exchanging HELLO of size %d from peer %s!\n", 
              (int) GNUNET_HELLO_size((const struct GNUNET_HELLO_Message 
*)message),
              GNUNET_i2s (&me->id));
+#endif
   GNUNET_TRANSPORT_offer_hello (p2.th, message, NULL, NULL);
 }
 
@@ -670,8 +675,10 @@
 try_connect (void *cls,
             const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
+#if DEBUG_CONNECTIONS
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Asking peers to connect...\n");
+#endif
   GNUNET_TRANSPORT_try_connect (p2.th,
                                &p1.id);
   GNUNET_TRANSPORT_try_connect (p1.th,




reply via email to

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