From 4e0c95f0c26a4cfdfd6d2499d13e6c1238fa5e94 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sat, 22 Sep 2018 01:21:55 +0200 Subject: put curl default options on one place --- src/exchange-lib/exchange_api_deposit.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/exchange-lib/exchange_api_deposit.c') diff --git a/src/exchange-lib/exchange_api_deposit.c b/src/exchange-lib/exchange_api_deposit.c index 50d52588..53fd3c6e 100644 --- a/src/exchange-lib/exchange_api_deposit.c +++ b/src/exchange-lib/exchange_api_deposit.c @@ -30,6 +30,7 @@ #include "taler_exchange_service.h" #include "exchange_api_handle.h" #include "taler_signatures.h" +#include "curl_defaults.h" /** @@ -490,7 +491,7 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange, dh->amount_with_fee = *amount; dh->coin_value = dki->value; - eh = curl_easy_init (); + eh = TEL_curl_easy_get (dh->url); GNUNET_assert (NULL != (dh->json_enc = json_dumps (deposit_obj, JSON_COMPACT))); @@ -498,18 +499,10 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "URL for deposit: `%s'\n", dh->url); - GNUNET_assert (CURLE_OK == - curl_easy_setopt (eh, - CURLOPT_URL, - dh->url)); GNUNET_assert (CURLE_OK == curl_easy_setopt (eh, CURLOPT_POSTFIELDS, dh->json_enc)); - GNUNET_assert (CURLE_OK == - curl_easy_setopt (eh, - CURLOPT_ENCODING, - "deflate")); GNUNET_assert (CURLE_OK == curl_easy_setopt (eh, CURLOPT_POSTFIELDSIZE, -- cgit v1.2.3