From 6982ccd78b185751553a01d1f420d5603ad2faca Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 19 Aug 2018 12:22:42 +0200 Subject: force TALER_EXCHANGE_connect() va-list to be actually provided --- src/exchange-lib/exchange_api_handle.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/exchange-lib/exchange_api_handle.c') diff --git a/src/exchange-lib/exchange_api_handle.c b/src/exchange-lib/exchange_api_handle.c index 2be8b37b..1d8a31b7 100644 --- a/src/exchange-lib/exchange_api_handle.c +++ b/src/exchange-lib/exchange_api_handle.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014-2017 GNUnet e.V. + Copyright (C) 2014-2018 GNUnet e.V. TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -117,6 +117,12 @@ struct TALER_EXCHANGE_Handle */ struct GNUNET_SCHEDULER_Task *retry_task; + /** + * Raw key data of the exchange, only valid if + * @e handshake_complete is past stage #MHS_CERT. + */ + json_t *key_data_raw; + /** * Key data of the exchange, only valid if * @e handshake_complete is past stage #MHS_CERT. @@ -133,12 +139,6 @@ struct TALER_EXCHANGE_Handle */ struct GNUNET_TIME_Absolute key_data_expiration; - /** - * Raw key data of the exchange, only valid if - * @e handshake_complete is past stage #MHS_CERT. - */ - json_t *key_data_raw; - /** * Stage of the exchange's initialization routines. */ @@ -801,7 +801,7 @@ TALER_EXCHANGE_check_keys_current (struct TALER_EXCHANGE_Handle *exchange, if ( (GNUNET_NO == force_download) && (0 < GNUNET_TIME_absolute_get_remaining (exchange->key_data_expiration).rel_value_us) ) return exchange->key_data_expiration; - if (NULL != exchange->retry_task) + if (NULL == exchange->retry_task) exchange->retry_task = GNUNET_SCHEDULER_add_now (&request_keys, exchange); return GNUNET_TIME_UNIT_ZERO_ABS; @@ -1096,8 +1096,10 @@ header_cb (char *buffer, return total; } + /* ********************* public API ******************* */ + /** * Initialise a connection to the exchange. Will connect to the * exchange and obtain information about the exchange's master public @@ -1121,7 +1123,12 @@ TALER_EXCHANGE_connect (struct GNUNET_CURL_Context *ctx, ...) { struct TALER_EXCHANGE_Handle *exchange; + va_list ap; + va_start (ap, cert_cb_cls); + GNUNET_assert (TALER_EXCHANGE_OPTION_END == + va_arg (ap, int)); + va_end (ap); exchange = GNUNET_new (struct TALER_EXCHANGE_Handle); exchange->ctx = ctx; exchange->url = GNUNET_strdup (url); -- cgit v1.2.3