diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-08-01 22:49:04 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-08-01 22:49:04 +0200 |
commit | 92b86cc5a7277de1a3b3ab55aaf37c83a649930e (patch) | |
tree | eef73525a65c6fe6825559f050b8ea971ca8302a /src/lib/merchant_api_lock_product.c | |
parent | 4e18bf19dfed52aa448a0b0d8547c0be182ba36a (diff) |
finish implementing #6935
Diffstat (limited to 'src/lib/merchant_api_lock_product.c')
-rw-r--r-- | src/lib/merchant_api_lock_product.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/lib/merchant_api_lock_product.c b/src/lib/merchant_api_lock_product.c index e9593fdb..a3c345d5 100644 --- a/src/lib/merchant_api_lock_product.c +++ b/src/lib/merchant_api_lock_product.c @@ -168,18 +168,13 @@ TALER_MERCHANT_product_lock ( struct TALER_MERCHANT_ProductLockHandle *plh; json_t *req_obj; - req_obj = json_pack ("{s:o, s:o, s:I}", - "lock_uuid", - GNUNET_JSON_from_data_auto (uuid), - "duration", - GNUNET_JSON_from_time_rel (duration), - "quantity", - (json_int_t) quantity); - if (NULL == req_obj) - { - GNUNET_break (0); - return NULL; - } + req_obj = GNUNET_JSON_PACK ( + GNUNET_JSON_pack_data_auto ("lock_uuid", + uuid), + GNUNET_JSON_pack_time_rel ("duration", + duration), + GNUNET_JSON_pack_uint64 ("quantity", + quantity)); plh = GNUNET_new (struct TALER_MERCHANT_ProductLockHandle); plh->ctx = ctx; plh->cb = cb; |