From 661bd552f0c2f6ba77860dae633322ddaf19bd6d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 31 Jul 2023 18:32:20 +0200 Subject: future-proof API --- src/testing/testing_api_cmd_config.c | 12 ++++-------- src/testing/testing_api_cmd_policy_lookup.c | 10 ++++------ 2 files changed, 8 insertions(+), 14 deletions(-) (limited to 'src/testing') diff --git a/src/testing/testing_api_cmd_config.c b/src/testing/testing_api_cmd_config.c index 7b0dbca..069200b 100644 --- a/src/testing/testing_api_cmd_config.c +++ b/src/testing/testing_api_cmd_config.c @@ -61,29 +61,25 @@ struct ConfigState * Function called with the results of a #ANASTASIS_get_config(). * * @param cls closure - * @param http_status HTTP status of the request * @param config config from the server */ static void config_cb (void *cls, - unsigned int http_status, const struct ANASTASIS_Config *config) { struct ConfigState *ss = cls; ss->so = NULL; - if (http_status != ss->http_status) + if (config->http_status != ss->http_status) { TALER_TESTING_unexpected_status (ss->is, - http_status, + config->http_status, ss->http_status); } - if (NULL == config) + if (GNUNET_OK == config->http_status) { - TALER_TESTING_interpreter_fail (ss->is); - return; + ss->provider_salt = config->details.ok.provider_salt; } - ss->provider_salt = config->provider_salt; TALER_TESTING_interpreter_next (ss->is); } diff --git a/src/testing/testing_api_cmd_policy_lookup.c b/src/testing/testing_api_cmd_policy_lookup.c index e8c4983..58c7ddb 100644 --- a/src/testing/testing_api_cmd_policy_lookup.c +++ b/src/testing/testing_api_cmd_policy_lookup.c @@ -72,27 +72,25 @@ struct PolicyLookupState * Function called with the results of a #ANASTASIS_policy_lookup(). * * @param cls closure - * @param http_status HTTP status of the request * @param dd details about the lookup operation */ static void policy_lookup_cb (void *cls, - unsigned int http_status, const struct ANASTASIS_DownloadDetails *dd) { struct PolicyLookupState *pls = cls; pls->plo = NULL; - if (http_status != pls->http_status) + if (dd->http_status != pls->http_status) { TALER_TESTING_unexpected_status (pls->is, - http_status, + dd->http_status, pls->http_status); } if (NULL != pls->upload_reference) { - if ( (MHD_HTTP_OK == http_status) && - (0 != GNUNET_memcmp (&dd->curr_policy_hash, + if ( (MHD_HTTP_OK == dd->http_status) && + (0 != GNUNET_memcmp (&dd->details.ok.curr_policy_hash, pls->upload_hash)) ) { GNUNET_break (0); -- cgit v1.2.3