gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] branch master updated: allow claim token match if we ha


From: gnunet
Subject: [taler-merchant] branch master updated: allow claim token match if we have a claimed but unpaid contract
Date: Wed, 12 Aug 2020 21:58:25 +0200

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

grothoff pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 7815ccb  allow claim token match if we have a claimed but unpaid 
contract
7815ccb is described below

commit 7815ccb8c2cc74d44eb214e0c1f14833c5638b45
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Aug 12 21:58:23 2020 +0200

    allow claim token match if we have a claimed but unpaid contract
---
 src/backend/taler-merchant-httpd_get-orders-ID.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_get-orders-ID.c 
b/src/backend/taler-merchant-httpd_get-orders-ID.c
index 5bc5821..25e9631 100644
--- a/src/backend/taler-merchant-httpd_get-orders-ID.c
+++ b/src/backend/taler-merchant-httpd_get-orders-ID.c
@@ -913,6 +913,7 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
   struct GetOrderData *god = hc->ctx;
   const char *order_id = hc->infix;
   enum GNUNET_DB_QueryStatus qs;
+  bool contract_match = false;
 
   if (NULL == god)
   {
@@ -1066,9 +1067,12 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
                                            TALER_EC_INTERNAL_LOGIC_ERROR,
                                            "Could not hash contract terms");
       }
-      if (0 !=
-          GNUNET_memcmp (&h,
-                         &god->h_contract_terms))
+      contract_match = (0 ==
+                        GNUNET_memcmp (&h,
+                                       &god->h_contract_terms));
+      if ( (GNUNET_NO ==
+            GNUNET_is_zero (&god->h_contract_terms)) &&
+           (! contract_match) )
       {
         GNUNET_break_op (0);
         return TALER_MHD_reply_with_error (connection,
@@ -1078,7 +1082,8 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
       }
     }
 
-    if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
+    if ( (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs) ||
+         (! contract_match) )
     {
       struct TALER_ClaimTokenP db_claim_token;
 

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