diff options
Diffstat (limited to 'src/testing/testing_api_cmd_post_reserves.c')
-rw-r--r-- | src/testing/testing_api_cmd_post_reserves.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/testing/testing_api_cmd_post_reserves.c b/src/testing/testing_api_cmd_post_reserves.c index b2167534..fe3de9ed 100644 --- a/src/testing/testing_api_cmd_post_reserves.c +++ b/src/testing/testing_api_cmd_post_reserves.c @@ -79,32 +79,29 @@ struct PostReservesState * POST /reserves request to a merchant * * @param cls closure - * @param hr HTTP response details - * @param reserve_pub public key of the created reserve, NULL on error - * @param payto_uri where to make the payment to for filling the reserve, NULL on error + * @param prr response details */ static void post_reserves_cb (void *cls, - const struct TALER_MERCHANT_HttpResponse *hr, - const struct TALER_ReservePublicKeyP *reserve_pub, - const char *payto_uri) + const struct TALER_MERCHANT_PostReservesResponse *prr) { struct PostReservesState *prs = cls; prs->prh = NULL; - if (prs->http_status != hr->http_status) + if (prs->http_status != prr->hr.http_status) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Unexpected response code %u (%d) to command %s\n", - hr->http_status, - (int) hr->ec, + prr->hr.http_status, + (int) prr->hr.ec, TALER_TESTING_interpreter_get_current_label (prs->is)); TALER_TESTING_interpreter_fail (prs->is); return; } - switch (hr->http_status) + switch (prr->hr.http_status) { case MHD_HTTP_OK: + prs->reserve_pub = prr->details.ok.reserve_pub; break; case MHD_HTTP_ACCEPTED: break; @@ -116,9 +113,9 @@ post_reserves_cb (void *cls, GNUNET_break (0); GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Unhandled HTTP status %u for POST /reserves.\n", - hr->http_status); + prr->hr.http_status); + break; } - prs->reserve_pub = *reserve_pub; TALER_TESTING_interpreter_next (prs->is); } |