*/
int32_t status GNUNET_PACKED;
+ /**
+ * Minimum expiration time required for content to be stored
+ * by the datacache at this time, zero for unknown or no limit.
+ */
+ struct GNUNET_TIME_AbsoluteNBO min_expiration;
+
};
*
* @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 */
}
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;
}
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;
}
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);
}
static void
-check_success (void *cls, int success, const char *msg)
+check_success (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg)
{
struct CpsRunContext *crc = cls;
*
* @param cls closure
* @param success GNUNET_SYSERR on failure
+ * @param min_expiration minimum expiration time required for content to be stored
+ * by the datacache at this time, zero for unknown
* @param msg NULL on success, otherwise an error message
*/
static void
-remove_next (void *cls, int success, const char *msg)
+remove_next (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg)
{
struct CpsRunContext *crc = cls;
static void
-run_tests (void *cls, int success, const char *msg)
+run_tests (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg)
{
struct CpsRunContext *crc = cls;
static void
-check_success (void *cls, int success, const char *msg)
+check_success (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg)
{
struct CpsRunContext *crc = cls;
static void
-get_reserved (void *cls, int success, const char *msg)
+get_reserved (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg)
{
struct CpsRunContext *crc = cls;
static void
-run_tests (void *cls, int32_t success, const char *msg)
+run_tests (void *cls, int32_t success, struct GNUNET_TIME_Absolute min_expiration, const char *msg)
{
struct CpsRunContext *crc = cls;
static void
-check_success (void *cls, int success, const char *msg)
+check_success (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg)
{
struct CpsRunContext *crc = cls;
static void
-run_tests (void *cls, int success, const char *msg)
+run_tests (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg)
{
struct CpsRunContext *crc = cls;
*
* @param cls closure (our struct AdvertismentContext)
* @param success GNUNET_SYSERR on failure
+ * @param min_expiration minimum expiration time required for content to be stored
* @param msg NULL on success, otherwise an error message
*/
static void
-advertisement_cont (void *cls, int success, const char *msg)
+advertisement_cont (void *cls, int success,
+ struct GNUNET_TIME_Absolute min_expiration,
+ const char *msg)
{
struct AdvertisementContext *ac = cls;
const char *keyword;
ctx->ns = namespace;
ctx->ns->rc++;
ctx->bo = *bo;
- advertisement_cont (ctx, GNUNET_OK, NULL);
+ advertisement_cont (ctx, GNUNET_OK, GNUNET_TIME_UNIT_ZERO_ABS, NULL);
}
*
* @param cls closure of type "struct PublishSksContext*"
* @param success GNUNET_OK on success
+ * @param min_expiration minimum expiration time required for content to be stored
* @param msg error message (or NULL)
*/
static void
-sb_put_cont (void *cls, int success, const char *msg)
+sb_put_cont (void *cls, int success,
+ struct GNUNET_TIME_Absolute min_expiration,
+ const char *msg)
{
struct PublishSksContext *psc = cls;
GNUNET_HashCode hc;
{
GNUNET_free (sb_enc);
GNUNET_free (sb);
- sb_put_cont (psc, GNUNET_OK, NULL);
+ sb_put_cont (psc, GNUNET_OK, GNUNET_TIME_UNIT_ZERO_ABS, NULL);
return;
}
psc->dsh = GNUNET_DATASTORE_connect (h->cfg);
{
GNUNET_free (sb_enc);
GNUNET_free (sb);
- sb_put_cont (psc, GNUNET_NO, _("Failed to connect to datastore."));
+ sb_put_cont (psc, GNUNET_NO, GNUNET_TIME_UNIT_ZERO_ABS, _("Failed to connect to datastore."));
return;
}
GNUNET_CRYPTO_hash_xor (&sks_uri->data.sks.namespace, &id, &query);
*
* @param cls the 'struct GNUNET_FS_PublishContext'
* @param success GNUNET_OK on success
+ * @param min_expiration minimum expiration time required for content to be stored
* @param msg error message (or NULL)
*/
static void
-ds_put_cont (void *cls, int success, const char *msg)
+ds_put_cont (void *cls, int success,
+ struct GNUNET_TIME_Absolute min_expiration,
+ const char *msg)
{
struct GNUNET_FS_PublishContext *pc = cls;
struct GNUNET_FS_ProgressInfo pi;
*
* @param cls the 'struct GNUNET_FS_PublishContext'
* @param success success code (not used)
+ * @param min_expiration minimum expiration time required for content to be stored
* @param msg error message (typically NULL, not used)
*/
static void
-finish_release_reserve (void *cls, int success, const char *msg)
+finish_release_reserve (void *cls, int success,
+ struct GNUNET_TIME_Absolute min_expiration,
+ const char *msg)
{
struct GNUNET_FS_PublishContext *pc = cls;
}
else
{
- finish_release_reserve (pc, GNUNET_OK, NULL);
+ finish_release_reserve (pc, GNUNET_OK, GNUNET_TIME_UNIT_ZERO_ABS, NULL);
}
}
*
* @param cls the 'struct GNUNET_FS_PublishContext*'
* @param success positive reservation ID on success
+ * @param min_expiration minimum expiration time required for content to be stored
* @param msg error message on error, otherwise NULL
*/
static void
-finish_reserve (void *cls, int success, const char *msg)
+finish_reserve (void *cls, int success,
+ struct GNUNET_TIME_Absolute min_expiration,
+ const char *msg)
{
struct GNUNET_FS_PublishContext *pc = cls;
*
* @param cls closure of type "struct PublishKskContext*"
* @param success GNUNET_OK on success
+ * @param min_expiration minimum expiration time required for content to be stored
* @param msg error message (or NULL)
*/
static void
-kb_put_cont (void *cls, int success, const char *msg)
+kb_put_cont (void *cls, int success,
+ struct GNUNET_TIME_Absolute min_expiration,
+ const char *msg)
{
struct PublishKskContext *pkc = cls;
*
* @param cls closure
* @param success GNUNET_SYSERR on failure
+ * @param min_expiration minimum expiration time required for content to be stored
* @param msg NULL on success, otherwise an error message
*/
static void
-process_cont (void *cls, int success, const char *msg)
+process_cont (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg)
{
struct GNUNET_FS_UnindexContext *uc = cls;
*
* @param cls unused
* @param success did the deletion work?
+ * @param min_expiration minimum expiration time required for content to be stored
* @param msg error message
*/
static void
-remove_cont (void *cls, int success, const char *msg)
+remove_cont (void *cls, int success,
+ struct GNUNET_TIME_Absolute min_expiration,
+ const char *msg)
{
if (GNUNET_OK != success)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
*
* @param cls closure
* @param success GNUNET_SYSERR on failure
+ * @param min_expiration minimum expiration time required for content to be stored
* @param msg NULL on success, otherwise an error message
*/
static void
-put_migration_continuation (void *cls, int success, const char *msg)
+put_migration_continuation (void *cls, int success,
+ struct GNUNET_TIME_Absolute min_expiration,
+ const char *msg)
{
struct PutMigrationContext *pmc = cls;
- struct GNUNET_TIME_Relative delay;
struct GNUNET_TIME_Relative block_time;
struct GSF_ConnectedPeer *cp;
struct GSF_PeerPerformanceData *ppd;
- delay = GNUNET_TIME_absolute_get_duration (pmc->start);
cp = GSF_peer_get_ (&pmc->origin);
if ((GNUNET_OK != success) && (GNUNET_NO == pmc->requested))
{
GNUNET_CONSTANTS_SERVICE_TIMEOUT,
&put_migration_continuation, pmc))
{
- put_migration_continuation (pmc, GNUNET_NO, NULL);
+ put_migration_continuation (pmc, GNUNET_NO, GNUNET_TIME_UNIT_ZERO_ABS, NULL);
}
}
}
GNUNET_CONSTANTS_SERVICE_TIMEOUT,
&put_migration_continuation, pmc))
{
- put_migration_continuation (pmc, GNUNET_NO, NULL);
+ put_migration_continuation (pmc, GNUNET_NO, GNUNET_TIME_UNIT_ZERO_ABS, NULL);
}
}
else
* @param success GNUNET_SYSERR on failure (including timeout/queue drop)
* GNUNET_NO if content was already there
* GNUNET_YES (or other positive value) on success
+ * @param min_expiration minimum expiration time required for content to be stored
+ * by the datacache at this time, zero for unknown
* @param msg NULL on success, otherwise an error message
*/
typedef void (*GNUNET_DATASTORE_ContinuationWithStatus) (void *cls,
int32_t success,
+ struct GNUNET_TIME_Absolute min_expiration,
const char *msg);