From 8694e7b799bb2ef02ade6c4705da7193d22f26f6 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Wed, 24 Jun 2015 14:23:27 +0000 Subject: - complain about excessive core waiting times --- src/cadet/gnunet-service-cadet_peer.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c index 3a2cfe5b8..d7ff6e71a 100644 --- a/src/cadet/gnunet-service-cadet_peer.c +++ b/src/cadet/gnunet-service-cadet_peer.c @@ -1150,7 +1150,8 @@ queue_send (void *cls, size_t size, void *buf) /* 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 @@ queue_send (void *cls, size_t size, void *buf) 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 */ -- cgit v1.2.3