summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_refund.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-05 22:05:38 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-05 22:05:38 +0200
commitbf8c5982a2e79f0b5198a0033dd41e9702d093f9 (patch)
tree93b62feb9b7e24ae3d4f73b1a5f883a8fc368bfe /src/testing/testing_api_cmd_refund.c
parent5059da7108fb2d65fc3844ffe695574c532f8dff (diff)
downloadexchange-bf8c5982a2e79f0b5198a0033dd41e9702d093f9.tar.gz
exchange-bf8c5982a2e79f0b5198a0033dd41e9702d093f9.tar.bz2
exchange-bf8c5982a2e79f0b5198a0033dd41e9702d093f9.zip
make exchange API more uniform in how information is returned
Diffstat (limited to 'src/testing/testing_api_cmd_refund.c')
-rw-r--r--src/testing/testing_api_cmd_refund.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/testing/testing_api_cmd_refund.c b/src/testing/testing_api_cmd_refund.c
index 0150086e..7dbcc341 100644
--- a/src/testing/testing_api_cmd_refund.c
+++ b/src/testing/testing_api_cmd_refund.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014-2018 Taler Systems SA
+ Copyright (C) 2014-2020 Taler Systems SA
TALER is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as
@@ -80,18 +80,14 @@ struct RefundState
* response code is acceptable.
*
* @param cls closure
- * @param http_status HTTP response code.
- * @param ec taler-specific error code.
+ * @param hr HTTP response details
* @param exchange_pub public key the exchange
* used for signing @a obj.
- * @param obj response object.
*/
static void
refund_cb (void *cls,
- unsigned int http_status,
- enum TALER_ErrorCode ec,
- const struct TALER_ExchangePublicKeyP *exchange_pub,
- const json_t *obj)
+ const struct TALER_EXCHANGE_HttpResponse *hr,
+ const struct TALER_ExchangePublicKeyP *exchange_pub)
{
struct RefundState *rs = cls;
@@ -99,15 +95,18 @@ refund_cb (void *cls,
refund_cmd = &rs->is->commands[rs->is->ip];
rs->rh = NULL;
- if (rs->expected_response_code != http_status)
+ if (rs->expected_response_code != hr->http_status)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Unexpected response code %u to command %s in %s:%u\n",
- http_status,
+ "Unexpected response code %u/%d to command %s in %s:%u\n",
+ hr->http_status,
+ hr->ec,
refund_cmd->label,
__FILE__,
__LINE__);
- json_dumpf (obj, stderr, 0);
+ json_dumpf (hr->reply,
+ stderr,
+ 0);
TALER_TESTING_interpreter_fail (rs->is);
return;
}