From bf2d1ccefd7b5bd13295733a36bf19afba46f4b2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 19 Dec 2011 13:54:35 +0000 Subject: adding min_expiration argument to GNUNET_DATASTORE_ContinuationWithStatus callback to communicate which content has a chance of being stored in the medium term --- src/datastore/datastore_api.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/datastore/datastore_api.c') diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c index 46004c4f3..36d1d98b7 100644 --- a/src/datastore/datastore_api.c +++ b/src/datastore/datastore_api.c @@ -697,10 +697,13 @@ process_queue (struct GNUNET_DATASTORE_Handle *h) * * @param cls closure * @param result result + * @param min_expiration expiration time * @param emsg error message */ static void -drop_status_cont (void *cls, int32_t result, const char *emsg) +drop_status_cont (void *cls, int32_t result, + struct GNUNET_TIME_Absolute min_expiration, + const char *emsg) { /* do nothing */ } @@ -765,6 +768,7 @@ process_status_message (void *cls, const struct GNUNET_MessageHeader *msg) process_queue (h); if (rc.cont != NULL) rc.cont (rc.cont_cls, GNUNET_SYSERR, + GNUNET_TIME_UNIT_ZERO_ABS, _("Failed to receive status response from database.")); return; } @@ -778,6 +782,7 @@ process_status_message (void *cls, const struct GNUNET_MessageHeader *msg) do_disconnect (h); if (rc.cont != NULL) rc.cont (rc.cont_cls, GNUNET_SYSERR, + GNUNET_TIME_UNIT_ZERO_ABS, _("Error reading response from datastore service")); return; } @@ -807,7 +812,9 @@ process_status_message (void *cls, const struct GNUNET_MessageHeader *msg) h->retry_time.rel_value = 0; process_queue (h); if (rc.cont != NULL) - rc.cont (rc.cont_cls, status, emsg); + rc.cont (rc.cont_cls, status, + GNUNET_TIME_absolute_ntoh (sm->min_expiration), + emsg); } -- cgit v1.2.3