diff options
Diffstat (limited to 'src/testing/testing_api_cmd_config.c')
-rw-r--r-- | src/testing/testing_api_cmd_config.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/testing/testing_api_cmd_config.c b/src/testing/testing_api_cmd_config.c index 6487be4e..adde106a 100644 --- a/src/testing/testing_api_cmd_config.c +++ b/src/testing/testing_api_cmd_config.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2020 Taler Systems SA + Copyright (C) 2020-2023 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 @@ -84,24 +84,22 @@ config_cleanup (void *cls, * Process "GET /public/config" (lookup) response. * * @param cls closure - * @param hr HTTP response we got - * @param ci basic information about the merchant - * @param compat protocol compatibility information + * @param cr response we got */ static void config_cb (void *cls, - const struct TALER_MERCHANT_HttpResponse *hr, - const struct TALER_MERCHANT_ConfigInformation *ci, - enum TALER_MERCHANT_VersionCompatibility compat) + const struct TALER_MERCHANT_ConfigResponse *cr) { struct ConfigState *cs = cls; - (void) ci; cs->vgh = NULL; - if (cs->http_code != hr->http_status) - TALER_TESTING_FAIL (cs->is); - if (TALER_MERCHANT_VC_MATCH != compat) + if (cs->http_code != cr->hr.http_status) TALER_TESTING_FAIL (cs->is); + if (MHD_HTTP_OK == cr->hr.http_status) + { + if (TALER_MERCHANT_VC_MATCH != cr->details.ok.compat) + TALER_TESTING_FAIL (cs->is); + } TALER_TESTING_interpreter_next (cs->is); } @@ -121,7 +119,8 @@ config_run (void *cls, struct ConfigState *cs = cls; cs->is = is; - cs->vgh = TALER_MERCHANT_config_get (is->ctx, + cs->vgh = TALER_MERCHANT_config_get (TALER_TESTING_interpreter_get_context ( + is), cs->merchant_url, &config_cb, cs); |