diff options
Diffstat (limited to 'src/testing/testing_api_cmd_config.c')
-rw-r--r-- | src/testing/testing_api_cmd_config.c | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/src/testing/testing_api_cmd_config.c b/src/testing/testing_api_cmd_config.c index 92a8ae1..542e140 100644 --- a/src/testing/testing_api_cmd_config.c +++ b/src/testing/testing_api_cmd_config.c @@ -61,39 +61,26 @@ 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) { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Unexpected response code %u to command %s in %s:%u\n", - http_status, - ss->is->commands[ss->is->ip].label, - __FILE__, - __LINE__); - TALER_TESTING_interpreter_fail (ss->is); + TALER_TESTING_unexpected_status (ss->is, + config->http_status, + ss->http_status); return; } - if (NULL == config) + if (GNUNET_OK == config->http_status) { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Config is NULL, command %s in %s:%u\n", - ss->is->commands[ss->is->ip].label, - __FILE__, - __LINE__); - 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); } @@ -113,10 +100,11 @@ config_run (void *cls, struct ConfigState *ss = cls; ss->is = is; - ss->so = ANASTASIS_get_config (is->ctx, - ss->anastasis_url, - &config_cb, - ss); + ss->so = ANASTASIS_get_config ( + TALER_TESTING_interpreter_get_context (is), + ss->anastasis_url, + &config_cb, + ss); if (NULL == ss->so) { GNUNET_break (0); |