summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_post_products.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-25 22:32:36 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-25 22:32:36 +0200
commit46aa711262566b7a8f358cbe684c64ed526a5edb (patch)
treef4defe802906f061e66ba1ce82247f3c4c8d1f1b /src/testing/testing_api_cmd_post_products.c
parent23750b7d0622c7080ff8acde2b623568b98a88f4 (diff)
downloadmerchant-46aa711262566b7a8f358cbe684c64ed526a5edb.tar.gz
merchant-46aa711262566b7a8f358cbe684c64ed526a5edb.tar.bz2
merchant-46aa711262566b7a8f358cbe684c64ed526a5edb.zip
misc bugfixes
Diffstat (limited to 'src/testing/testing_api_cmd_post_products.c')
-rw-r--r--src/testing/testing_api_cmd_post_products.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/testing/testing_api_cmd_post_products.c b/src/testing/testing_api_cmd_post_products.c
index 8f787bc1..68f68972 100644
--- a/src/testing/testing_api_cmd_post_products.c
+++ b/src/testing/testing_api_cmd_post_products.c
@@ -87,7 +87,7 @@ struct PostProductsState
/**
* in @e units, -1 to indicate "infinite" (i.e. electronic books)
*/
- int64_t total_stocked;
+ int64_t total_stock;
/**
* where the product is in stock
@@ -131,10 +131,13 @@ post_products_cb (void *cls,
}
switch (hr->http_status)
{
- case MHD_HTTP_OK:
+ case MHD_HTTP_NO_CONTENT:
+ break;
+ case MHD_HTTP_CONFLICT:
break;
// FIXME: add other legitimate states here...
default:
+ GNUNET_break (0);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Unhandled HTTP status.\n");
}
@@ -167,7 +170,7 @@ post_products_run (void *cls,
&pis->price,
pis->image,
pis->taxes,
- pis->total_stocked,
+ pis->total_stock,
pis->address,
pis->next_restock,
&post_products_cb,
@@ -219,7 +222,7 @@ post_products_cleanup (void *cls,
* applicable taxes.
* @param image base64-encoded product image
* @param taxes list of taxes paid by the merchant
- * @param total_stocked in @a units, -1 to indicate "infinite" (i.e. electronic books)
+ * @param total_stock in @a units, -1 to indicate "infinite" (i.e. electronic books)
* @param address where the product is in stock
* @param next_restock when the next restocking is expected to happen, 0 for unknown,
* #GNUNET_TIME_UNIT_FOREVER_ABS for 'never'.
@@ -237,7 +240,7 @@ TALER_TESTING_cmd_merchant_post_products2 (
const char *price,
json_t *image,
json_t *taxes,
- int64_t total_stocked,
+ int64_t total_stock,
json_t *address,
struct GNUNET_TIME_Absolute next_restock,
unsigned int http_status)
@@ -256,7 +259,7 @@ TALER_TESTING_cmd_merchant_post_products2 (
&pis->price));
pis->image = image; /* ownership taken */
pis->taxes = taxes; /* ownership taken */
- pis->total_stocked = total_stocked;
+ pis->total_stock = total_stock;
pis->address = address; /* ownership taken */
pis->next_restock = next_restock;
{