summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/curl/curl_fetcher.c
diff options
context:
space:
mode:
authorRomain Francoise <rfrancoise@debian.org>2014-10-21 19:28:38 +0200
committerRomain Francoise <rfrancoise@debian.org>2014-10-21 19:28:38 +0200
commit2b8de74ff4c334c25e89988c4a401b24b5bcf03d (patch)
tree10fb49ca94bfd0c8b8a583412281abfc0186836e /src/libstrongswan/plugins/curl/curl_fetcher.c
parent81c63b0eed39432878f78727f60a1e7499645199 (diff)
downloadvyos-strongswan-2b8de74ff4c334c25e89988c4a401b24b5bcf03d.tar.gz
vyos-strongswan-2b8de74ff4c334c25e89988c4a401b24b5bcf03d.zip
Import upstream release 5.2.1
Diffstat (limited to 'src/libstrongswan/plugins/curl/curl_fetcher.c')
-rw-r--r--src/libstrongswan/plugins/curl/curl_fetcher.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstrongswan/plugins/curl/curl_fetcher.c b/src/libstrongswan/plugins/curl/curl_fetcher.c
index 620cf74f3..7653c1986 100644
--- a/src/libstrongswan/plugins/curl/curl_fetcher.c
+++ b/src/libstrongswan/plugins/curl/curl_fetcher.c
@@ -86,6 +86,7 @@ METHOD(fetcher_t, fetch, status_t,
private_curl_fetcher_t *this, char *uri, void *userdata)
{
char error[CURL_ERROR_SIZE], *enc_uri;
+ CURLcode curl_status;
status_t status;
long result = 0;
cb_data_t data = {
@@ -123,7 +124,8 @@ METHOD(fetcher_t, fetch, status_t,
}
DBG2(DBG_LIB, " sending http request to '%s'...", uri);
- switch (curl_easy_perform(this->curl))
+ curl_status = curl_easy_perform(this->curl);
+ switch (curl_status)
{
case CURLE_UNSUPPORTED_PROTOCOL:
status = NOT_SUPPORTED;
@@ -138,7 +140,8 @@ METHOD(fetcher_t, fetch, status_t,
status = (result >= 200 && result < 300) ? SUCCESS : FAILED;
break;
default:
- DBG1(DBG_LIB, "libcurl http request failed: %s", error);
+ DBG1(DBG_LIB, "libcurl http request failed [%d]: %s", curl_status,
+ error);
status = FAILED;
break;
}