projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed Solaris compilation errors
[collectd.git]
/
src
/
curl_xml.c
diff --git
a/src/curl_xml.c
b/src/curl_xml.c
index
61b5ade
..
052ea1e
100644
(file)
--- a/
src/curl_xml.c
+++ b/
src/curl_xml.c
@@
-555,7
+555,8
@@
static int cx_curl_perform (cx_t *db, CURL *curl) /* {{{ */
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &url);
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &rc);
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &url);
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &rc);
- if (rc != 200)
+ /* The response code is zero if a non-HTTP transport was used. */
+ if ((rc != 0) && (rc != 200))
{
ERROR ("curl_xml plugin: curl_easy_perform failed with response code %ld (%s)",
rc, url);
{
ERROR ("curl_xml plugin: curl_easy_perform failed with response code %ld (%s)",
rc, url);