gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-anastasis] branch master updated: add force_payment and timeout s


From: gnunet
Subject: [taler-anastasis] branch master updated: add force_payment and timeout support to reduxer
Date: Sat, 13 Mar 2021 13:11:23 +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 d5e5907  add force_payment and timeout support to reduxer
d5e5907 is described below

commit d5e5907b06a0806cf7e21d67feaf637c14f8eedc
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat Mar 13 13:11:19 2021 +0100

    add force_payment and timeout support to reduxer
---
 contrib/gana                             |  2 +-
 src/reducer/anastasis_api_backup_redux.c | 24 ++++++++++++++++++++----
 2 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/contrib/gana b/contrib/gana
index 943729d..880352a 160000
--- a/contrib/gana
+++ b/contrib/gana
@@ -1 +1 @@
-Subproject commit 943729d4e2c2d97c3b5d737cf76b388086d94378
+Subproject commit 880352a419beee4864f863182dbc695c859ee3f7
diff --git a/src/reducer/anastasis_api_backup_redux.c 
b/src/reducer/anastasis_api_backup_redux.c
index a44a950..5545365 100644
--- a/src/reducer/anastasis_api_backup_redux.c
+++ b/src/reducer/anastasis_api_backup_redux.c
@@ -1466,11 +1466,19 @@ share_secret (struct UploadContext *uc)
   void *core_secret;
   json_t *jpolicies;
   json_t *payments = NULL;
+  bool force_payment = false;
   unsigned int policies_len;
   unsigned int pds_len;
+  struct GNUNET_TIME_Relative timeout = GNUNET_TIME_UNIT_ZERO;
   struct GNUNET_JSON_Specification spec[] = {
     GNUNET_JSON_spec_json ("identity_attributes",
                            &user_id),
+    GNUNET_JSON_spec_mark_optional (
+      GNUNET_JSON_spec_relative_time ("timeout",
+                                      &timeout)),
+    GNUNET_JSON_spec_mark_optional (
+      GNUNET_JSON_spec_bool ("force_pay",
+                             &force_payment)),
     GNUNET_JSON_spec_json ("policies",
                            &jpolicies),
     GNUNET_JSON_spec_mark_optional (
@@ -1683,8 +1691,8 @@ share_secret (struct UploadContext *uc)
                                      policies_len,
                                      pds,
                                      pds_len,
-                                     false,  /* FIXME-#6759: support forced 
payments */
-                                     GNUNET_TIME_UNIT_ZERO, /* FIXME: support 
long polling!*/
+                                     force_payment,
+                                     timeout,
                                      &secret_share_result_cb,
                                      uc,
                                      core_secret,
@@ -2002,11 +2010,19 @@ check_truth_upload (struct UploadContext *uc,
     const char *payment_request = NULL;
     const char *mime_type = NULL;
     const char *instructions = NULL;
+    bool force_payment = false;
     void *truth_data;
     size_t truth_data_size;
+    struct GNUNET_TIME_Relative timeout = GNUNET_TIME_UNIT_ZERO;
     struct GNUNET_JSON_Specification spec[] = {
       GNUNET_JSON_spec_string ("type",
                                &type),
+      GNUNET_JSON_spec_mark_optional (
+        GNUNET_JSON_spec_relative_time ("timeout",
+                                        &timeout)),
+      GNUNET_JSON_spec_mark_optional (
+        GNUNET_JSON_spec_bool ("force_pay",
+                               &force_payment)),
       GNUNET_JSON_spec_mark_optional (
         GNUNET_JSON_spec_string ("mime_type",
                                  &mime_type)),
@@ -2070,11 +2086,11 @@ check_truth_upload (struct UploadContext *uc,
                                       &salt,
                                       truth_data,
                                       truth_data_size,
-                                      false,     /* FIXME-#6759: support 
forced payments */
+                                      force_payment,
                                       (NULL != payment_request)
                                           ? &tue->ps
                                           : NULL,
-                                      GNUNET_TIME_UNIT_ZERO, /* FIXME: support 
long polling!*/
+                                      timeout,
                                       &truth_upload_cb,
                                       tue);
     if (NULL == tue->tu)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]