diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-06-21 09:00:58 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-06-21 09:00:58 +0200 |
commit | f5ce22ddf6da6aae6a9077dba122013c1dbc55d9 (patch) | |
tree | dc80e36922103c8008fab36a825b1c0e3b1cae22 /src/lib/exchange_api_handle.c | |
parent | af77a2a178a818abe851e4e25e768e2c1963b49c (diff) | |
download | exchange-f5ce22ddf6da6aae6a9077dba122013c1dbc55d9.tar.gz exchange-f5ce22ddf6da6aae6a9077dba122013c1dbc55d9.tar.bz2 exchange-f5ce22ddf6da6aae6a9077dba122013c1dbc55d9.zip |
-more clean up of auditor api: atomization complete
Diffstat (limited to 'src/lib/exchange_api_handle.c')
-rw-r--r-- | src/lib/exchange_api_handle.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c index 0d9bf0416..4d245b077 100644 --- a/src/lib/exchange_api_handle.c +++ b/src/lib/exchange_api_handle.c @@ -110,7 +110,7 @@ struct TEAH_AuditorListEntry /** * Handle to the auditor. */ - struct TALER_AUDITOR_Handle *ah; + struct TALER_AUDITOR_GetConfigHandle *ah; /** * Head of DLL of interactions with this auditor. @@ -583,13 +583,14 @@ parse_global_fee (struct TALER_EXCHANGE_GlobalFee *gf, * @param vr response from the auditor */ static void -auditor_version_cb ( +auditor_config_cb ( void *cls, - const struct TALER_AUDITOR_VersionResponse *vr) + const struct TALER_AUDITOR_ConfigResponse *vr) { struct TEAH_AuditorListEntry *ale = cls; enum TALER_AUDITOR_VersionCompatibility compat; + ale->ah = NULL; if (MHD_HTTP_OK != vr->hr.http_status) { /* In this case, we don't mark the auditor as 'up' */ @@ -664,10 +665,10 @@ update_auditors (struct TALER_EXCHANGE_Handle *exchange) GNUNET_CONTAINER_DLL_insert (exchange->auditors_head, exchange->auditors_tail, ale); - ale->ah = TALER_AUDITOR_connect (exchange->ctx, - ale->auditor_url, - &auditor_version_cb, - ale); + ale->ah = TALER_AUDITOR_get_config (exchange->ctx, + ale->auditor_url, + &auditor_config_cb, + ale); } } @@ -2137,9 +2138,11 @@ TALER_EXCHANGE_disconnect (struct TALER_EXCHANGE_Handle *exchange) GNUNET_CONTAINER_DLL_remove (exchange->auditors_head, exchange->auditors_tail, ale); - TALER_LOG_DEBUG ("Disconnecting the auditor `%s'\n", - ale->auditor_url); - TALER_AUDITOR_disconnect (ale->ah); + if (NULL != ale->ah) + { + TALER_AUDITOR_get_config_cancel (ale->ah); + ale->ah = NULL; + } GNUNET_free (ale->auditor_url); GNUNET_free (ale); } |