summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 38697ec)
raw | patch | inline | side by side (parent: 38697ec)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Sat, 4 Apr 2015 23:16:13 +0000 (01:16 +0200) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Sat, 4 Apr 2015 23:16:13 +0000 (01:16 +0200) |
... to avoid portability problems.
src/apache.c | patch | blob | history | |
src/ascent.c | patch | blob | history | |
src/bind.c | patch | blob | history | |
src/curl.c | patch | blob | history | |
src/curl_json.c | patch | blob | history | |
src/curl_xml.c | patch | blob | history | |
src/nginx.c | patch | blob | history |
diff --git a/src/apache.c b/src/apache.c
index 9e91b8024f948f23a5c83328c828a51652481d01..0d915b07d29a5b2e83db736fb0668e3570140c83 100644 (file)
--- a/src/apache.c
+++ b/src/apache.c
curl_easy_setopt (st->curl, CURLOPT_CAINFO, st->cacert);
if (st->timeout >= 0)
- curl_easy_setopt (st->curl, CURLOPT_TIMEOUT_MS, st->timeout);
+ curl_easy_setopt (st->curl, CURLOPT_TIMEOUT_MS, (long) st->timeout);
else
curl_easy_setopt (st->curl, CURLOPT_TIMEOUT_MS,
CDTIME_T_TO_MS(plugin_get_interval()));
diff --git a/src/ascent.c b/src/ascent.c
index 66640d999e6645bf5aaf8a38f6df8a93331e6a1f..501f294f7319960828a81909d6872f0146c69388 100644 (file)
--- a/src/ascent.c
+++ b/src/ascent.c
curl_easy_setopt (curl, CURLOPT_CAINFO, cacert);
if (timeout != NULL)
- curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS, atoi(timeout));
+ curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS, atol(timeout));
else
curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS,
CDTIME_T_TO_MS(plugin_get_interval()));
diff --git a/src/bind.c b/src/bind.c
index c36cf482a00226308f9e94b0e00787925291543a..9a4b63915e4f950a45b015f0444d9867c2158370 100644 (file)
--- a/src/bind.c
+++ b/src/bind.c
curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt (curl, CURLOPT_MAXREDIRS, 50L);
curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS, (timeout >= 0) ?
- timeout : CDTIME_T_TO_MS(plugin_get_interval()));
+ (long) timeout : CDTIME_T_TO_MS(plugin_get_interval()));
return (0);
diff --git a/src/curl.c b/src/curl.c
index 893cc54ca628cd8046af5a419752dd8e36e6fa1c..1bbeddc7a6eb87e664efe45e8b65f1350adc47a6 100644 (file)
--- a/src/curl.c
+++ b/src/curl.c
curl_easy_setopt (wp->curl, CURLOPT_POSTFIELDS, wp->post_body);
if (wp->timeout >= 0)
- curl_easy_setopt (wp->curl, CURLOPT_TIMEOUT_MS, wp->timeout);
+ curl_easy_setopt (wp->curl, CURLOPT_TIMEOUT_MS, (long) wp->timeout);
else
curl_easy_setopt (wp->curl, CURLOPT_TIMEOUT_MS,
CDTIME_T_TO_MS(plugin_get_interval()));
diff --git a/src/curl_json.c b/src/curl_json.c
index 292b262cc16cd99dca803568af191eaf42150f9a..5128c87410ea3b0d4a5ec781810cd6d4b699ed96 100644 (file)
--- a/src/curl_json.c
+++ b/src/curl_json.c
curl_easy_setopt (db->curl, CURLOPT_POSTFIELDS, db->post_body);
if (db->timeout >= 0)
- curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS, db->timeout);
+ curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS, (long) db->timeout);
else if (db->interval > 0)
curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS,
CDTIME_T_TO_MS(db->timeout));
diff --git a/src/curl_xml.c b/src/curl_xml.c
index c67d9a3a4c11f16c6d61b6d5d005f5924c67d4d7..32a48c511afcf6e9c636117a0955cf96b882d816 100644 (file)
--- a/src/curl_xml.c
+++ b/src/curl_xml.c
curl_easy_setopt (db->curl, CURLOPT_POSTFIELDS, db->post_body);
if (db->timeout >= 0)
- curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS, db->timeout);
+ curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS, (long) db->timeout);
else
curl_easy_setopt (db->curl, CURLOPT_TIMEOUT_MS,
CDTIME_T_TO_MS(plugin_get_interval()));
diff --git a/src/nginx.c b/src/nginx.c
index edb55b9e986e5af91eed8d0dcbc1e31499c8f106..1c537a85e46e7ac80e1502f3647a9f29fa6bdd64 100644 (file)
--- a/src/nginx.c
+++ b/src/nginx.c
if (timeout != NULL)
{
- curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS, atoi(timeout));
+ curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS, atol(timeout));
}
else
{