[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: fix infinite supply handling: Da
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: fix infinite supply handling: Database can only represent INT64_MAX, not UINT64_MAX |
Date: |
Mon, 19 Apr 2021 17:45:03 +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 36626959 fix infinite supply handling: Database can only represent
INT64_MAX, not UINT64_MAX
36626959 is described below
commit 366269596329bb44987b3da25d62a2d4081e4d70
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Apr 19 17:45:01 2021 +0200
fix infinite supply handling: Database can only represent INT64_MAX, not
UINT64_MAX
---
src/backend/taler-merchant-httpd_private-get-products-ID.c | 2 +-
src/backend/taler-merchant-httpd_private-patch-products-ID.c | 2 +-
src/backend/taler-merchant-httpd_private-post-products.c | 2 +-
src/testing/Makefile.am | 1 +
4 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_private-get-products-ID.c
b/src/backend/taler-merchant-httpd_private-get-products-ID.c
index d98b4801..1fdabc8f 100644
--- a/src/backend/taler-merchant-httpd_private-get-products-ID.c
+++ b/src/backend/taler-merchant-httpd_private-get-products-ID.c
@@ -76,7 +76,7 @@ TMH_private_get_products_ID (const struct TMH_RequestHandler
*rh,
"taxes",
pd.taxes,
"total_stock",
- (UINT64_MAX == pd.total_stock)
+ (INT64_MAX == pd.total_stock)
? (json_int_t) -1
: (json_int_t) pd.total_stock,
/* end of first group of 5 */
diff --git a/src/backend/taler-merchant-httpd_private-patch-products-ID.c
b/src/backend/taler-merchant-httpd_private-patch-products-ID.c
index 8f7f6243..92f5c036 100644
--- a/src/backend/taler-merchant-httpd_private-patch-products-ID.c
+++ b/src/backend/taler-merchant-httpd_private-patch-products-ID.c
@@ -163,7 +163,7 @@ TMH_private_patch_products_ID (const struct
TMH_RequestHandler *rh,
NULL);
}
if (-1 == total_stock)
- pd.total_stock = UINT64_MAX;
+ pd.total_stock = INT64_MAX;
else
pd.total_stock = (uint64_t) total_stock;
if (NULL != json_object_get (hc->request_body,
diff --git a/src/backend/taler-merchant-httpd_private-post-products.c
b/src/backend/taler-merchant-httpd_private-post-products.c
index 6239a653..dac92bb9 100644
--- a/src/backend/taler-merchant-httpd_private-post-products.c
+++ b/src/backend/taler-merchant-httpd_private-post-products.c
@@ -132,7 +132,7 @@ TMH_private_post_products (const struct TMH_RequestHandler
*rh,
NULL);
}
if (-1 == total_stock)
- pd.total_stock = UINT64_MAX;
+ pd.total_stock = INT64_MAX;
else
pd.total_stock = (uint64_t) total_stock;
diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am
index ec7dd843..00623068 100644
--- a/src/testing/Makefile.am
+++ b/src/testing/Makefile.am
@@ -10,6 +10,7 @@ endif
check_SCRIPTS = \
test-merchant-walletharness.sh \
test_merchant_instance_response.sh \
+ test_merchant_product_creation.sh \
test_merchant_order_creation.sh
lib_LTLIBRARIES = \
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: fix infinite supply handling: Database can only represent INT64_MAX, not UINT64_MAX,
gnunet <=