aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-dht_datacache.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-06-12 11:09:50 +0200
committerChristian Grothoff <christian@grothoff.org>2018-06-12 11:10:01 +0200
commitae8b5cb2eac770be0d18b7d46c238bf865e34023 (patch)
tree78ecc715e15d4116390adde53b4e117f432bb599 /src/dht/gnunet-service-dht_datacache.c
parentbb581dc55bfb90fc7f34797111b55d16e69b7af0 (diff)
complain if datacache returns expired values
Diffstat (limited to 'src/dht/gnunet-service-dht_datacache.c')
-rw-r--r--src/dht/gnunet-service-dht_datacache.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dht/gnunet-service-dht_datacache.c b/src/dht/gnunet-service-dht_datacache.c
index 1f01387ff8..7ad9aa7280 100644
--- a/src/dht/gnunet-service-dht_datacache.c
+++ b/src/dht/gnunet-service-dht_datacache.c
@@ -171,6 +171,11 @@ datacache_get_iterator (void *cls,
struct GetRequestContext *ctx = cls;
enum GNUNET_BLOCK_EvaluationResult eval;
+ if (0 == GNUNET_TIME_absolute_get_remaining (exp).rel_value_us)
+ {
+ GNUNET_break (0); /* why does datacache return expired values? */
+ return GNUNET_OK; /* skip expired record */
+ }
if ( (NULL == data) &&
(0 == data_size) )
data = &non_null; /* point anywhere, but not to NULL */