summaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorJonathan Buchanan <jonathan.russ.buchanan@gmail.com>2020-07-29 21:38:21 -0400
committerJonathan Buchanan <jonathan.russ.buchanan@gmail.com>2020-07-29 21:38:21 -0400
commit5bdbbd68c4e11a322fe5c1b92c5ccc962863dbb1 (patch)
treefc52eb9ae5251e557693b725f9e240d22712e661 /src/testing
parent26085c8712c509d1384d1de99fec1bc9d3d15386 (diff)
downloadmerchant-5bdbbd68c4e11a322fe5c1b92c5ccc962863dbb1.tar.gz
merchant-5bdbbd68c4e11a322fe5c1b92c5ccc962863dbb1.tar.bz2
merchant-5bdbbd68c4e11a322fe5c1b92c5ccc962863dbb1.zip
revert to use pointers for claim token client lib
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/testing_api_cmd_claim_order.c6
-rw-r--r--src/testing/testing_api_cmd_post_orders.c7
2 files changed, 6 insertions, 7 deletions
diff --git a/src/testing/testing_api_cmd_claim_order.c b/src/testing/testing_api_cmd_claim_order.c
index ecdd1078..314f1c65 100644
--- a/src/testing/testing_api_cmd_claim_order.c
+++ b/src/testing/testing_api_cmd_claim_order.c
@@ -189,7 +189,7 @@ order_claim_run (void *cls,
const struct GNUNET_CRYPTO_EddsaPublicKey *nonce;
/* Only used if we do NOT use the nonce/token from traits. */
struct GNUNET_CRYPTO_EddsaPublicKey dummy_nonce;
- struct TALER_ClaimTokenP claim_token = {0};
+ const struct TALER_ClaimTokenP *claim_token;
pls->is = is;
if (NULL != pls->order_id)
@@ -203,7 +203,6 @@ order_claim_run (void *cls,
else
{
const struct TALER_TESTING_Command *order_cmd;
- const struct TALER_ClaimTokenP *ct;
order_cmd
= TALER_TESTING_interpreter_lookup_command (is,
@@ -223,11 +222,10 @@ order_claim_run (void *cls,
if (GNUNET_OK !=
TALER_TESTING_get_trait_claim_token (order_cmd,
0,
- &ct))
+ &claim_token))
{
TALER_TESTING_FAIL (is);
}
- claim_token = *ct;
if (GNUNET_OK !=
TALER_TESTING_get_trait_order_id (order_cmd,
diff --git a/src/testing/testing_api_cmd_post_orders.c b/src/testing/testing_api_cmd_post_orders.c
index 313be782..a91bc21f 100644
--- a/src/testing/testing_api_cmd_post_orders.c
+++ b/src/testing/testing_api_cmd_post_orders.c
@@ -232,12 +232,13 @@ static void
order_cb (void *cls,
const struct TALER_MERCHANT_HttpResponse *hr,
const char *order_id,
- struct TALER_ClaimTokenP claim_token)
+ const struct TALER_ClaimTokenP *claim_token)
{
struct OrdersState *ps = cls;
ps->po = NULL;
- ps->claim_token = claim_token;
+ if (NULL != claim_token)
+ ps->claim_token = *claim_token;
if (ps->http_status != hr->http_status)
{
TALER_LOG_ERROR ("Given vs expected: %u(%d) vs %u\n",
@@ -287,7 +288,7 @@ order_cb (void *cls,
ps->merchant_url,
ps->order_id,
&ps->nonce,
- ps->claim_token,
+ &ps->claim_token,
&orders_claim_cb,
ps)))
TALER_TESTING_FAIL (ps->is);