[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated: partial fixes2
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated: partial fixes2 |
Date: |
Thu, 18 Mar 2021 00:21:59 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository anastasis.
The following commit(s) were added to refs/heads/master by this push:
new f8d877b partial fixes2
f8d877b is described below
commit f8d877b22d9629ed41624ae19b9cd3b5741478db
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Thu Mar 18 00:21:56 2021 +0100
partial fixes2
---
src/lib/anastasis_backup.c | 2 ++
src/reducer/anastasis_api_backup_redux.c | 34 +++++++++++---------------------
2 files changed, 14 insertions(+), 22 deletions(-)
diff --git a/src/lib/anastasis_backup.c b/src/lib/anastasis_backup.c
index d22e68a..fb1e6c3 100644
--- a/src/lib/anastasis_backup.c
+++ b/src/lib/anastasis_backup.c
@@ -392,6 +392,8 @@ ANASTASIS_truth_upload (struct GNUNET_CURL_Context *ctx,
struct ANASTASIS_CRYPTO_TruthKeyP truth_key;
struct ANASTASIS_CRYPTO_KeyShareP key_share;
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Creating fresh truth object\n");
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
&question_salt,
sizeof (question_salt));
diff --git a/src/reducer/anastasis_api_backup_redux.c
b/src/reducer/anastasis_api_backup_redux.c
index ad60901..0ff43db 100644
--- a/src/reducer/anastasis_api_backup_redux.c
+++ b/src/reducer/anastasis_api_backup_redux.c
@@ -1231,6 +1231,11 @@ struct TruthUpload
*/
unsigned int policies_length;
+ /**
+ * Status of the upload.
+ */
+ enum ANASTASIS_UploadStatus us;
+
/**
* Taler error code of the upload.
*/
@@ -1359,6 +1364,12 @@ serialize_truth (struct UploadContext *uc)
pmr->method_index);
json_t *truth = ANASTASIS_truth_to_json (tue->t);
+#if IDEMPOTENCY_FIXED
+ GNUNET_assert (0 ==
+ json_object_set_new (truth,
+ "upload_status",
+ json_integer (tue->us)));
+#endif
GNUNET_assert (NULL != policy);
GNUNET_assert (NULL != methods);
GNUNET_assert (NULL != auth_method);
@@ -1884,37 +1895,16 @@ truth_upload_cb (void *cls,
const struct ANASTASIS_UploadDetails *ud)
{
struct TruthUpload *tue = cls;
- json_t *policies;
tue->tu = NULL;
tue->t = t;
tue->ec = ud->ec;
+ tue->us = ud->us;
if (ANASTASIS_US_PAYMENT_REQUIRED == ud->us)
{
tue->payment_request = GNUNET_strdup (
ud->details.payment.payment_request);
}
- /* persist upload status for later */
- policies = json_object_get (tue->uc->state,
- "policies");
- for (unsigned int i = 0; i<tue->policies_length; i++)
- {
- const struct PolicyMethodReference *pmr = &tue->policies[i];
- json_t *policy = json_array_get (policies,
- pmr->policy_index);
- json_t *methods = json_object_get (policy,
- "methods");
- json_t *method = json_array_get (methods,
- pmr->method_index);
-
- GNUNET_assert (NULL != policy);
- GNUNET_assert (NULL != methods);
- GNUNET_assert (NULL != method);
- GNUNET_assert (0 ==
- json_object_set_new (method,
- "upload_status",
- json_integer (ud->us)));
- }
check_upload_finished (tue->uc);
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-anastasis] branch master updated: partial fixes2,
gnunet <=