gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r35976 - gnunet/src/cadet


From: gnunet
Subject: [GNUnet-SVN] r35976 - gnunet/src/cadet
Date: Wed, 24 Jun 2015 16:23:27 +0200

Author: bartpolot
Date: 2015-06-24 16:23:27 +0200 (Wed, 24 Jun 2015)
New Revision: 35976

Modified:
   gnunet/src/cadet/gnunet-service-cadet_peer.c
Log:
- complain about excessive core waiting times

Modified: gnunet/src/cadet/gnunet-service-cadet_peer.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_peer.c        2015-06-24 14:13:53 UTC 
(rev 35975)
+++ gnunet/src/cadet/gnunet-service-cadet_peer.c        2015-06-24 14:23:27 UTC 
(rev 35976)
@@ -1150,7 +1150,8 @@
   /* Sanity checking */
   if (NULL == buf || 0 == size)
   {
-    LOG (GNUNET_ERROR_TYPE_DEBUG, "Buffer size 0.\n");
+    GNUNET_break ();
+    LOG (GNUNET_ERROR_TYPE_WARNING, "CORE gave buffer size 0.\n");
     peer->tmt_time.abs_value_us = 0;
     peer->core_transmit = NULL;
     return 0;
@@ -1170,8 +1171,12 @@
     return 0;
   }
   core_wait_time = GNUNET_TIME_absolute_get_duration (peer->tmt_time);
-  LOG (GNUNET_ERROR_TYPE_DEBUG, " core wait time %s\n",
-       GNUNET_STRINGS_relative_time_to_string (core_wait_time, GNUNET_NO));
+  if (core_wait_time.rel_value_us >= 1000000)
+    LOG (GNUNET_ERROR_TYPE_ERROR, " core wait time %s > 1 second\n",
+         GNUNET_STRINGS_relative_time_to_string (core_wait_time, GNUNET_NO));
+  else
+    LOG (GNUNET_ERROR_TYPE_DEBUG, " core wait time %s\n",
+         GNUNET_STRINGS_relative_time_to_string (core_wait_time, GNUNET_NO));
   peer->tmt_time.abs_value_us = 0;
 
   /* Copy all possible messages to the core buffer */




reply via email to

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