[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] 01/02: moving definitions to header file
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] 01/02: moving definitions to header file |
Date: |
Wed, 05 Jul 2017 12:17:26 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant.
commit 71d4d4ced10dbb995bb28605e60ffbda68be88a3
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Jul 5 09:38:50 2017 +0200
moving definitions to header file
---
src/backend/taler-merchant-httpd_refund.c | 27 ++-------------------------
src/backend/taler-merchant-httpd_refund.h | 20 ++++++++++++++++++++
2 files changed, 22 insertions(+), 25 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_refund.c
b/src/backend/taler-merchant-httpd_refund.c
index b196870..dbbbd3d 100644
--- a/src/backend/taler-merchant-httpd_refund.c
+++ b/src/backend/taler-merchant-httpd_refund.c
@@ -25,9 +25,7 @@
#include "taler-merchant-httpd.h"
#include "taler-merchant-httpd_parsing.h"
#include "taler-merchant-httpd_responses.h"
-
-#define REFUND_CONFIRMATION 0
-
+#include "taler-merchant-httpd_refund.h"
/**
* How often do we retry the non-trivial refund INSERT database
@@ -35,27 +33,6 @@
*/
#define MAX_RETRIES 5
-
-/**
- * We confirm with a signature that the refund has been successfully
- * done. Even though the frontend doesn't usually do crypto, this signature
- * may turn useful in court.
- */
-struct RefundConfirmationP
-{
-
- /**
- * Purpose is simply set to zero, see macro REFUND_CONFIRMATION above
- */
- struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-
- /**
- * Hashing the order id, as frontends don't handle contract terms
- */
- struct GNUNET_HashCode h_order_id GNUNET_PACKED;
-
-};
-
struct ProcessRefundData
{
/**
@@ -286,7 +263,7 @@ MH_handler_refund_increase (struct TMH_RequestHandler *rh,
json_decref (root);
GNUNET_JSON_parse_free (spec);
- confirmation.purpose.purpose = REFUND_CONFIRMATION;
+ confirmation.purpose.purpose = TALER_SIGNATURE_MERCHANT_REFUND_OK;
confirmation.purpose.size = htonl (sizeof (struct RefundConfirmationP));
if (GNUNET_OK !=
diff --git a/src/backend/taler-merchant-httpd_refund.h
b/src/backend/taler-merchant-httpd_refund.h
index 64da3f9..c19d69e 100644
--- a/src/backend/taler-merchant-httpd_refund.h
+++ b/src/backend/taler-merchant-httpd_refund.h
@@ -26,6 +26,26 @@
#include "taler-merchant-httpd.h"
/**
+ * We confirm with a signature that the refund has been successfully
+ * done. Even though the frontend doesn't usually do crypto, this signature
+ * may turn useful in court.
+ */
+struct RefundConfirmationP
+{
+
+ /**
+ * Set to TALER_SIGNATURE_MERCHANT_REFUND_OK.
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+
+ /**
+ * Hashing the order id, as frontends don't handle contract terms
+ */
+ struct GNUNET_HashCode h_order_id GNUNET_PACKED;
+
+};
+
+/**
* Handle request for increasing the refund associated with
* a contract.
*
--
To stop receiving notification emails like this one, please contact
address@hidden