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) | |
download | gnunet-8694e7b799bb2ef02ade6c4705da7193d22f26f6.tar.gz gnunet-8694e7b799bb2ef02ade6c4705da7193d22f26f6.zip |
- 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) | |||
1150 | /* Sanity checking */ | 1150 | /* Sanity checking */ |
1151 | if (NULL == buf || 0 == size) | 1151 | if (NULL == buf || 0 == size) |
1152 | { | 1152 | { |
1153 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Buffer size 0.\n"); | 1153 | GNUNET_break (); |
1154 | LOG (GNUNET_ERROR_TYPE_WARNING, "CORE gave buffer size 0.\n"); | ||
1154 | peer->tmt_time.abs_value_us = 0; | 1155 | peer->tmt_time.abs_value_us = 0; |
1155 | peer->core_transmit = NULL; | 1156 | peer->core_transmit = NULL; |
1156 | return 0; | 1157 | return 0; |
@@ -1170,8 +1171,12 @@ queue_send (void *cls, size_t size, void *buf) | |||
1170 | return 0; | 1171 | return 0; |
1171 | } | 1172 | } |
1172 | core_wait_time = GNUNET_TIME_absolute_get_duration (peer->tmt_time); | 1173 | core_wait_time = GNUNET_TIME_absolute_get_duration (peer->tmt_time); |
1173 | LOG (GNUNET_ERROR_TYPE_DEBUG, " core wait time %s\n", | 1174 | if (core_wait_time.rel_value_us >= 1000000) |
1174 | GNUNET_STRINGS_relative_time_to_string (core_wait_time, GNUNET_NO)); | 1175 | LOG (GNUNET_ERROR_TYPE_ERROR, " core wait time %s > 1 second\n", |
1176 | GNUNET_STRINGS_relative_time_to_string (core_wait_time, GNUNET_NO)); | ||
1177 | else | ||
1178 | LOG (GNUNET_ERROR_TYPE_DEBUG, " core wait time %s\n", | ||
1179 | GNUNET_STRINGS_relative_time_to_string (core_wait_time, GNUNET_NO)); | ||
1175 | peer->tmt_time.abs_value_us = 0; | 1180 | peer->tmt_time.abs_value_us = 0; |
1176 | 1181 | ||
1177 | /* Copy all possible messages to the core buffer */ | 1182 | /* Copy all possible messages to the core buffer */ |