diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2019-01-24 17:53:10 +0100 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2019-01-24 17:53:10 +0100 |
commit | 862ed50d7db6dad591bee045a7864e8310f1fbcc (patch) | |
tree | 480da4a128a54e9f0829dcaab52aed377327b666 /src/lib/exchange_api_handle.c | |
parent | 16002d20785785c03647d1648501aac3e9ce38bb (diff) | |
download | exchange-862ed50d7db6dad591bee045a7864e8310f1fbcc.tar.xz |
Auditor tests.
Fix double connection.
Diffstat (limited to 'src/lib/exchange_api_handle.c')
-rw-r--r-- | src/lib/exchange_api_handle.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c index 61b34fc87..78219e611 100644 --- a/src/lib/exchange_api_handle.c +++ b/src/lib/exchange_api_handle.c @@ -685,8 +685,11 @@ update_auditors (struct TALER_EXCHANGE_Handle *exchange) { struct TALER_EXCHANGE_Keys *kd = &exchange->key_data; + TALER_LOG_DEBUG ("Updating auditors\n"); for (unsigned int i=0;i<kd->num_auditors;i++) { + /* Compare auditor data from /keys with auditor data + * from owned exchange structures. */ struct TALER_EXCHANGE_AuditorInformation *auditor = &kd->auditors[i]; struct TEAH_AuditorListEntry *ale = NULL; @@ -704,7 +707,9 @@ update_auditors (struct TALER_EXCHANGE_Handle *exchange) } if (NULL != ale) continue; /* found, no need to add */ + /* new auditor, add */ + TALER_LOG_DEBUG ("Found new auditor!\n"); ale = GNUNET_new (struct TEAH_AuditorListEntry); ale->auditor_pub = auditor->auditor_pub; ale->auditor_url = GNUNET_strdup (auditor->auditor_url); @@ -1206,6 +1211,7 @@ keys_completed_cb (void *cls, aold->num_denom_keys * sizeof (struct TALER_EXCHANGE_AuditorDenominationInfo)); } + /* Old auditors got just copied into new ones. */ if (GNUNET_OK != decode_keys_json (j, GNUNET_YES, @@ -1728,6 +1734,9 @@ TALER_EXCHANGE_connect va_list ap; enum TALER_EXCHANGE_Option opt; + TALER_LOG_DEBUG ("Connecting to the exchange (%s)\n", + url); + exchange = GNUNET_new (struct TALER_EXCHANGE_Handle); exchange->ctx = ctx; exchange->url = GNUNET_strdup (url); |