summaryrefslogtreecommitdiff
path: root/src/lib/merchant_api_get_reserve.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-06-22 20:30:25 +0200
committerChristian Grothoff <christian@grothoff.org>2020-06-22 20:30:25 +0200
commit0748ecde7be1fb9537382d7cadc38031fbc696ff (patch)
tree9e4d6dbacb1e7d0c48d27e8f441f497d3a0f6cef /src/lib/merchant_api_get_reserve.c
parentd83304e2a3af18480e3c83077c54a1b532904d2b (diff)
downloadmerchant-0748ecde7be1fb9537382d7cadc38031fbc696ff.tar.gz
merchant-0748ecde7be1fb9537382d7cadc38031fbc696ff.tar.bz2
merchant-0748ecde7be1fb9537382d7cadc38031fbc696ff.zip
return active-status of reserves from backenddb (fixes FIXMEs)
Diffstat (limited to 'src/lib/merchant_api_get_reserve.c')
-rw-r--r--src/lib/merchant_api_get_reserve.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/merchant_api_get_reserve.c b/src/lib/merchant_api_get_reserve.c
index f92f37f9..3ff14d41 100644
--- a/src/lib/merchant_api_get_reserve.c
+++ b/src/lib/merchant_api_get_reserve.c
@@ -83,6 +83,7 @@ handle_reserve_get_finished (void *cls,
.http_status = (unsigned int) response_code,
.reply = json
};
+ bool active;
rgh->job = NULL;
switch (response_code)
@@ -99,6 +100,8 @@ handle_reserve_get_finished (void *cls,
&rs.creation_time),
GNUNET_JSON_spec_absolute_time ("expiration_time",
&rs.expiration_time),
+ GNUNET_JSON_spec_bool ("active",
+ &active),
TALER_JSON_spec_amount ("merchant_initial_amount",
&rs.merchant_initial_amount),
TALER_JSON_spec_amount ("exchange_initial_amount",
@@ -129,6 +132,7 @@ handle_reserve_get_finished (void *cls,
rgh->cb (rgh->cb_cls,
&hr,
&rs,
+ false,
0,
NULL);
TALER_MERCHANT_reserve_get_cancel (rgh);
@@ -186,6 +190,7 @@ handle_reserve_get_finished (void *cls,
rgh->cb (rgh->cb_cls,
&hr,
&rs,
+ active,
tds_length,
tds);
GNUNET_free (tds);
@@ -215,6 +220,7 @@ handle_reserve_get_finished (void *cls,
rgh->cb (rgh->cb_cls,
&hr,
NULL,
+ false,
0,
NULL);
TALER_MERCHANT_reserve_get_cancel (rgh);