diff options
Diffstat (limited to 'src/testing/testing_api_cmd_get_webhooks.c')
-rw-r--r-- | src/testing/testing_api_cmd_get_webhooks.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/testing/testing_api_cmd_get_webhooks.c b/src/testing/testing_api_cmd_get_webhooks.c index 536512aa..cbcd11c6 100644 --- a/src/testing/testing_api_cmd_get_webhooks.c +++ b/src/testing/testing_api_cmd_get_webhooks.c @@ -71,33 +71,29 @@ struct GetWebhooksState * Callback for a GET /webhooks operation. * * @param cls closure for this function - * @param hr HTTP response details - * @param webhooks_length length of the @a webhooks array - * @param webhooks array of webhooks the requested instance offers + * @param wgr response details */ static void get_webhooks_cb (void *cls, - const struct TALER_MERCHANT_HttpResponse *hr, - unsigned int webhooks_length, - const struct TALER_MERCHANT_WebhookEntry webhooks[]) + const struct TALER_MERCHANT_WebhooksGetResponse *wgr) { struct GetWebhooksState *gis = cls; gis->igh = NULL; - if (gis->http_status != hr->http_status) + if (gis->http_status != wgr->hr.http_status) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Unexpected response code %u (%d) to command %s\n", - hr->http_status, - (int) hr->ec, + wgr->hr.http_status, + (int) wgr->hr.ec, TALER_TESTING_interpreter_get_current_label (gis->is)); TALER_TESTING_interpreter_fail (gis->is); return; } - switch (hr->http_status) + switch (wgr->hr.http_status) { case MHD_HTTP_OK: - if (webhooks_length != gis->webhooks_length) + if (wgr->details.ok.webhooks_length != gis->webhooks_length) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Length of webhooks found does not match\n"); @@ -124,7 +120,7 @@ get_webhooks_cb (void *cls, TALER_TESTING_interpreter_fail (gis->is); return; } - if (0 != strcmp (webhooks[i].webhook_id, + if (0 != strcmp (wgr->details.ok.webhooks[i].webhook_id, *webhook_id)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, @@ -143,8 +139,8 @@ get_webhooks_cb (void *cls, default: GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Unhandled HTTP status %u (%d).\n", - hr->http_status, - hr->ec); + wgr->hr.http_status, + wgr->hr.ec); } TALER_TESTING_interpreter_next (gis->is); } |