aboutsummaryrefslogtreecommitdiff
path: root/src/datacache/plugin_datacache_heap.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-06-12 14:48:00 +0200
committerChristian Grothoff <christian@grothoff.org>2018-06-12 14:48:00 +0200
commitf6a87ee66310529edf76c0fab76cdc7cd2aac216 (patch)
treee3697e5f549bd6d0adbeede9935b67313d4907cf /src/datacache/plugin_datacache_heap.c
parentae8b5cb2eac770be0d18b7d46c238bf865e34023 (diff)
ensure datacache does not return expired records, fixig pq behavior with respect to FOREVER absolute time
Diffstat (limited to 'src/datacache/plugin_datacache_heap.c')
-rw-r--r--src/datacache/plugin_datacache_heap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/datacache/plugin_datacache_heap.c b/src/datacache/plugin_datacache_heap.c
index 2a08fc81b2..494d1ae17c 100644
--- a/src/datacache/plugin_datacache_heap.c
+++ b/src/datacache/plugin_datacache_heap.c
@@ -314,6 +314,9 @@ get_cb (void *cls,
if ( (get_ctx->type != val->type) &&
(GNUNET_BLOCK_TYPE_ANY != get_ctx->type) )
return GNUNET_OK;
+ if (0 ==
+ GNUNET_TIME_absolute_get_remaining (val->discard_time).rel_value_us)
+ return GNUNET_OK;
if (NULL != get_ctx->iter)
ret = get_ctx->iter (get_ctx->iter_cls,
key,