diff options
author | Bart Polot <bart@net.in.tum.de> | 2015-06-24 14:23:27 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2015-06-24 14:23:27 +0000 |
commit | 8694e7b799bb2ef02ade6c4705da7193d22f26f6 (patch) | |
tree | 6f75acf378148122ae785e98cc63fdce9cd02e9e /src | |
parent | 048d5a19aee28ac126612b2e9dbb1529a3a75225 (diff) |
- complain about excessive core waiting times
Diffstat (limited to 'src')
-rw-r--r-- | src/cadet/gnunet-service-cadet_peer.c | 11 |
1 files changed, 8 insertions, 3 deletions
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 */ |