diff options
Diffstat (limited to 'src/backend/anastasis-httpd_policy-meta.c')
-rw-r--r-- | src/backend/anastasis-httpd_policy-meta.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/backend/anastasis-httpd_policy-meta.c b/src/backend/anastasis-httpd_policy-meta.c index a786c68..7d143ef 100644 --- a/src/backend/anastasis-httpd_policy-meta.c +++ b/src/backend/anastasis-httpd_policy-meta.c @@ -36,6 +36,7 @@ * * @param cls closure with a `json_t *` to build up * @param version the version of the recovery document + * @param ts timestamp when the document was created * @param recovery_meta_data contains meta data about the encrypted recovery document * @param recovery_meta_data_size size of @a recovery_meta_data blob * @return #GNUNET_OK to continue to iterate, #GNUNET_NO to abort iteration @@ -43,6 +44,7 @@ static enum GNUNET_GenericReturnValue build_meta_result (void *cls, uint32_t version, + struct GNUNET_TIME_Timestamp ts, const void *recovery_meta_data, size_t recovery_meta_data_size) { @@ -57,11 +59,15 @@ build_meta_result (void *cls, json_object_set_new ( result, version_s, - (NULL == recovery_meta_data) - ? json_null () - : GNUNET_JSON_from_data ( - recovery_meta_data, - recovery_meta_data_size))); + GNUNET_JSON_PACK ( + GNUNET_JSON_pack_allow_null ( + GNUNET_JSON_pack_data_varsize ( + "meta", + recovery_meta_data, + recovery_meta_data_size)), + GNUNET_JSON_pack_timestamp ( + "upload_time", + ts)))); return GNUNET_OK; } |