[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] 44/277: fix ftbfs in lock logic
From: |
gnunet |
Subject: |
[taler-merchant] 44/277: fix ftbfs in lock logic |
Date: |
Sun, 05 Jul 2020 20:49:17 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
commit 5db333a4659da036fdd4e8097c9b1f376260e241
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Apr 24 18:52:32 2020 +0200
fix ftbfs in lock logic
---
src/testing/testing_api_cmd_lock_product.c | 31 ++++++++++++++++++++++++------
1 file changed, 25 insertions(+), 6 deletions(-)
diff --git a/src/testing/testing_api_cmd_lock_product.c
b/src/testing/testing_api_cmd_lock_product.c
index 009783e..58140ff 100644
--- a/src/testing/testing_api_cmd_lock_product.c
+++ b/src/testing/testing_api_cmd_lock_product.c
@@ -29,7 +29,7 @@
/**
- * State of a "LOCK /product" CMD.
+ * State of a "POST /products/$ID" CMD.
*/
struct LockProductState
{
@@ -54,6 +54,20 @@ struct LockProductState
*/
const char *product_id;
+ /**
+ * UUID that identifies the client holding the lock
+ */
+ struct GNUNET_Uuid uuid;
+
+ /**
+ * duration how long should the lock be held
+ */
+ struct GNUNET_TIME_Relative duration;
+
+ /**
+ * how much product should be locked
+ */
+ uint32_t quantity;
/**
* Expected HTTP response code.
@@ -117,8 +131,10 @@ lock_product_run (void *cls,
pis->iph = TALER_MERCHANT_product_lock (is->ctx,
pis->merchant_url,
pis->product_id,
- ...
- & lock_product_cb,
+ &pis->uuid,
+ pis->duration,
+ pis->quantity,
+ &lock_product_cb,
pis);
GNUNET_assert (NULL != pis->iph);
}
@@ -143,8 +159,6 @@ lock_product_cleanup (void *cls,
"POST /product/$ID/lock operation did not complete\n");
TALER_MERCHANT_product_lock_cancel (pis->iph);
}
- json_decref (pis->address);
- json_decref (pis->jurisdiction);
GNUNET_free (pis);
}
@@ -174,7 +188,9 @@ TALER_TESTING_cmd_merchant_lock_product (
const char *label,
const char *merchant_url,
const char *product_id,
- ...
+ const struct GNUNET_Uuid *uuid,
+ struct GNUNET_TIME_Relative duration,
+ uint32_t quantity,
unsigned int http_status)
{
struct LockProductState *pis;
@@ -183,6 +199,9 @@ TALER_TESTING_cmd_merchant_lock_product (
pis->merchant_url = merchant_url;
pis->product_id = product_id;
pis->http_status = http_status;
+ pis->uuid = *uuid;
+ pis->duration = duration;
+ pis->quantity = quantity;
{
struct TALER_TESTING_Command cmd = {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-merchant] 31/277: implemenet DELETE /products/, (continued)
- [taler-merchant] 31/277: implemenet DELETE /products/, gnunet, 2020/07/05
- [taler-merchant] 27/277: implement GET /products/, gnunet, 2020/07/05
- [taler-merchant] 34/277: add GET /instance CMD, gnunet, 2020/07/05
- [taler-merchant] 32/277: move libtalermerchanttesting and test cases to src/testing/, gnunet, 2020/07/05
- [taler-merchant] 35/277: add CMD for GET /instances, gnunet, 2020/07/05
- [taler-merchant] 33/277: move libtalermerchanttesting and test cases to src/testing/, gnunet, 2020/07/05
- [taler-merchant] 36/277: add DELETE /instances/ID command, gnunet, 2020/07/05
- [taler-merchant] 37/277: add cmd for POST /instances, gnunet, 2020/07/05
- [taler-merchant] 39/277: add PATCH /instances/ID command, gnunet, 2020/07/05
- [taler-merchant] 45/277: baseURL construction helper function', gnunet, 2020/07/05
- [taler-merchant] 44/277: fix ftbfs in lock logic,
gnunet <=
- [taler-merchant] 41/277: add DELETE/PURGE /instances/ID command, gnunet, 2020/07/05
- [taler-merchant] 42/277: implement purge, gnunet, 2020/07/05
- [taler-merchant] 43/277: toward stesting, gnunet, 2020/07/05
- [taler-merchant] 50/277: misc fixes, gnunet, 2020/07/05
- [taler-merchant] 49/277: fix fmt string, gnunet, 2020/07/05
- [taler-merchant] 68/277: sql-ing, gnunet, 2020/07/05
- [taler-merchant] 53/277: implemente DELETE /orders/ID, gnunet, 2020/07/05
- [taler-merchant] 38/277: add PATCH /instances/ID command, gnunet, 2020/07/05
- [taler-merchant] 46/277: improve API, gnunet, 2020/07/05
- [taler-merchant] 54/277: first hack at POST /orders, gnunet, 2020/07/05