diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-06-10 11:07:06 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-06-10 11:07:06 +0200 |
commit | 70bfe0ed1b9a5dbb6cc487465ef3c3df4cdb0436 (patch) | |
tree | 5f32b30f5b58dfc502c273bebecffbcb79fc3c4b /src/testing/testing_api_cmd_recoup.c | |
parent | 46188ae07e97d12b73269167459707844b3c2486 (diff) | |
parent | d8f8c550bd7ad85f9da9bc5edba619e533eabcc8 (diff) | |
download | exchange-70bfe0ed1b9a5dbb6cc487465ef3c3df4cdb0436.tar.xz |
Merge branch 'master' into age-withdraw
Diffstat (limited to 'src/testing/testing_api_cmd_recoup.c')
-rw-r--r-- | src/testing/testing_api_cmd_recoup.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/testing/testing_api_cmd_recoup.c b/src/testing/testing_api_cmd_recoup.c index e11475f20..9483b1582 100644 --- a/src/testing/testing_api_cmd_recoup.c +++ b/src/testing/testing_api_cmd_recoup.c @@ -82,7 +82,6 @@ recoup_cb (void *cls, struct RecoupState *ps = cls; const struct TALER_EXCHANGE_HttpResponse *hr = &rr->hr; struct TALER_TESTING_Interpreter *is = ps->is; - struct TALER_TESTING_Command *cmd = &is->commands[is->ip]; const struct TALER_TESTING_Command *reserve_cmd; char *cref; unsigned int idx; @@ -90,18 +89,8 @@ recoup_cb (void *cls, ps->ph = NULL; if (ps->expected_response_code != hr->http_status) { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Unexpected response code %u/%d to command %s in %s:%u\n", - hr->http_status, - (int) hr->ec, - cmd->label, - __FILE__, - __LINE__); - json_dumpf (hr->reply, - stderr, - 0); - fprintf (stderr, "\n"); - TALER_TESTING_interpreter_fail (is); + TALER_TESTING_unexpected_status (is, + hr->http_status); return; } @@ -193,7 +182,11 @@ recoup_run (void *cls, char *cref; unsigned int idx; const struct TALER_ExchangeWithdrawValues *ewv; + struct TALER_EXCHANGE_Handle *exchange + = TALER_TESTING_get_exchange (is); + if (NULL == exchange) + return; ps->is = is; if (GNUNET_OK != TALER_TESTING_parse_coin_reference ( @@ -266,7 +259,7 @@ recoup_run (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Trying to recoup denomination '%s'\n", TALER_B2S (&denom_pub->h_key)); - ps->ph = TALER_EXCHANGE_recoup (is->exchange, + ps->ph = TALER_EXCHANGE_recoup (exchange, denom_pub, coin_sig, ewv, |