gnunet-svn
[Top][All Lists]
Advanced

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

[taler-sync] branch master updated (2e2a2df -> c0e3270)


From: gnunet
Subject: [taler-sync] branch master updated (2e2a2df -> c0e3270)
Date: Fri, 30 Oct 2020 17:04:52 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a change to branch master
in repository sync.

    from 2e2a2df  version bump
     new d149110  API rename in merchant
     new c0e3270  update to match merchant API change

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/sync/sync-httpd_backup_post.c | 42 ++++++++++++++++++---------------------
 1 file changed, 19 insertions(+), 23 deletions(-)

diff --git a/src/sync/sync-httpd_backup_post.c 
b/src/sync/sync-httpd_backup_post.c
index 199420b..23872e5 100644
--- a/src/sync/sync-httpd_backup_post.c
+++ b/src/sync/sync-httpd_backup_post.c
@@ -100,7 +100,7 @@ struct BackupContext
   /**
    * Used while we are awaiting proposal creation.
    */
-  struct TALER_MERCHANT_PostOrdersOperation *po;
+  struct TALER_MERCHANT_PostOrdersHandle *po;
 
   /**
    * Used while we are waiting payment.
@@ -109,6 +109,7 @@ struct BackupContext
 
   /**
    * HTTP response code to use on resume, if non-NULL.
+
    */
   struct MHD_Response *resp;
 
@@ -305,35 +306,30 @@ make_payment_request (const char *order_id,
  * /contract request to a merchant.
  *
  * @param cls our `struct BackupContext`
- * @param hr HTTP response details
- * @param order_id order id of the newly created order
- * @param token the claim token generated by the merchant (NULL if
- *        it wasn't generated).
+ * @param por response details
  */
 static void
 proposal_cb (void *cls,
-             const struct TALER_MERCHANT_HttpResponse *hr,
-             const char *order_id,
-             const struct TALER_ClaimTokenP *token)
+             const struct TALER_MERCHANT_PostOrdersReply *por)
 {
   struct BackupContext *bc = cls;
   enum SYNC_DB_QueryStatus qs;
 
   bc->po = NULL;
-  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-              "Resuming connection with order `%s'\n",
-              order_id);
   GNUNET_CONTAINER_DLL_remove (bc_head,
                                bc_tail,
                                bc);
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+              "Resuming connection with order `%s'\n",
+              bc->order_id);
   MHD_resume_connection (bc->con);
   SH_trigger_daemon ();
-  if (MHD_HTTP_OK != hr->http_status)
+  if (MHD_HTTP_OK != por->hr.http_status)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                 "Backend returned status %u/%u\n",
-                hr->http_status,
-                (unsigned int) hr->ec);
+                por->hr.http_status,
+                (unsigned int) por->hr.ec);
     GNUNET_break (0);
     bc->resp = TALER_MHD_make_json_pack ("{s:I, s:s, s:I, s:I, s:O}",
                                          "code",
@@ -342,22 +338,22 @@ proposal_cb (void *cls,
                                          "hint",
                                          "Failed to setup order with merchant 
backend",
                                          "backend-ec",
-                                         (json_int_t) hr->ec,
+                                         (json_int_t) por->hr.ec,
                                          "backend-http-status",
-                                         (json_int_t) hr->http_status,
+                                         (json_int_t) por->hr.http_status,
                                          "backend-reply",
-                                         hr->reply);
+                                         por->hr.reply);
     GNUNET_assert (NULL != bc->resp);
     bc->response_code = MHD_HTTP_FAILED_DEPENDENCY;
     return;
   }
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "Storing payment request for order `%s'\n",
-              order_id);
+              por->details.ok.order_id);
   qs = db->store_payment_TR (db->cls,
                              &bc->account,
-                             order_id,
-                             token,
+                             por->details.ok.order_id,
+                             por->details.ok.token,
                              &SH_annual_fee);
   if (0 >= qs)
   {
@@ -370,9 +366,9 @@ proposal_cb (void *cls,
   }
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "Obtained fresh order `%s'\n",
-              order_id);
-  bc->resp = make_payment_request (order_id,
-                                   token);
+              por->details.ok.order_id);
+  bc->resp = make_payment_request (por->details.ok.order_id,
+                                   por->details.ok.token);
   GNUNET_assert (NULL != bc->resp);
   bc->response_code = MHD_HTTP_PAYMENT_REQUIRED;
 }

-- 
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]