summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_loop.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_loop.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_loop.c')
-rw-r--r--src/testing/testing_api_loop.c32
1 files changed, 13 insertions, 19 deletions
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c
index 51cd74a23..9b494da0c 100644
--- a/src/testing/testing_api_loop.c
+++ b/src/testing/testing_api_loop.c
@@ -589,49 +589,43 @@ sighandler_child_death (void)
*
* @param cls closure, typically, the "run" method containing
* all the commands to be run, and a closure for it.
+ * @param hr HTTP response details
* @param keys the exchange's keys.
* @param compat protocol compatibility information.
- * @param ec error code, #TALER_EC_NONE on success
- * @param http_status status returned by /keys, #MHD_HTTP_OK on success
- * @param full_reply JSON body of /keys request, NULL if reply was not in JSON
*/
void
TALER_TESTING_cert_cb (void *cls,
+ const struct TALER_EXCHANGE_HttpResponse *hr,
const struct TALER_EXCHANGE_Keys *keys,
- enum TALER_EXCHANGE_VersionCompatibility compat,
- enum TALER_ErrorCode ec,
- unsigned int http_status,
- const json_t *full_reply)
+ enum TALER_EXCHANGE_VersionCompatibility compat)
{
struct MainContext *main_ctx = cls;
struct TALER_TESTING_Interpreter *is = main_ctx->is;
(void) compat;
- (void) full_reply;
if (NULL == keys)
{
if (GNUNET_NO == is->working)
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Got NULL response for /keys during startup (%u/%d), retrying!\n",
- http_status,
- (int) ec);
+ hr->http_status,
+ (int) hr->ec);
TALER_EXCHANGE_disconnect (is->exchange);
- GNUNET_assert
- (NULL != (is->exchange = TALER_EXCHANGE_connect
- (is->ctx,
- main_ctx->exchange_url,
- &TALER_TESTING_cert_cb,
- main_ctx,
- TALER_EXCHANGE_OPTION_END)));
+ GNUNET_assert (NULL != (is->exchange
+ = TALER_EXCHANGE_connect (is->ctx,
+ main_ctx->exchange_url,
+ &TALER_TESTING_cert_cb,
+ main_ctx,
+ TALER_EXCHANGE_OPTION_END)));
return;
}
else
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Got NULL response for /keys during execution (%u/%d)!\n",
- http_status,
- (int) ec);
+ hr->http_status,
+ (int) hr->ec);
}
}
else