projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
collectd-tg: fix warning
[collectd.git]
/
src
/
curl.c
diff --git
a/src/curl.c
b/src/curl.c
index
02761d2
..
4bfd1e4
100644
(file)
--- a/
src/curl.c
+++ b/
src/curl.c
@@
-60,14
+60,14
@@
struct web_page_s /* {{{ */
char *user;
char *pass;
char *credentials;
char *user;
char *pass;
char *credentials;
-
_B
ool digest;
-
_B
ool verify_peer;
-
_B
ool verify_host;
+
b
ool digest;
+
b
ool verify_peer;
+
b
ool verify_host;
char *cacert;
struct curl_slist *headers;
char *post_body;
char *cacert;
struct curl_slist *headers;
char *post_body;
-
_B
ool response_time;
-
_B
ool response_code;
+
b
ool response_time;
+
b
ool response_code;
int timeout;
curl_stats_t *stats;
int timeout;
curl_stats_t *stats;
@@
-85,8
+85,7
@@
struct web_page_s /* {{{ */
/*
* Global variables;
*/
/*
* Global variables;
*/
-/* static CURLM *curl = NULL; */
-static web_page_t *pages_g = NULL;
+static web_page_t *pages_g;
/*
* Private functions
/*
* Private functions
@@
-370,8
+369,8
@@
static int cc_page_init_curl(web_page_t *wp) /* {{{ */
return -1;
}
return -1;
}
- s
s
nprintf(wp->credentials, credentials_size, "%s:%s", wp->user,
-
(wp->pass == NULL) ? "" : wp->pass);
+ snprintf(wp->credentials, credentials_size, "%s:%s", wp->user,
+ (wp->pass == NULL) ? "" : wp->pass);
curl_easy_setopt(wp->curl, CURLOPT_USERPWD, wp->credentials);
#endif
curl_easy_setopt(wp->curl, CURLOPT_USERPWD, wp->credentials);
#endif
@@
-418,11
+417,11
@@
static int cc_config_add_page(oconfig_item_t *ci) /* {{{ */
page->url = NULL;
page->user = NULL;
page->pass = NULL;
page->url = NULL;
page->user = NULL;
page->pass = NULL;
- page->digest =
0
;
- page->verify_peer =
1
;
- page->verify_host =
1
;
- page->response_time =
0
;
- page->response_code =
0
;
+ page->digest =
false
;
+ page->verify_peer =
true
;
+ page->verify_host =
true
;
+ page->response_time =
false
;
+ page->response_code =
false
;
page->timeout = -1;
page->stats = NULL;
page->timeout = -1;
page->stats = NULL;
@@
-631,7
+630,7
@@
static int cc_read_page(web_page_t *wp) /* {{{ */
if (wp->response_time)
cc_submit_response_time(wp, CDTIME_T_TO_DOUBLE(cdtime() - start));
if (wp->stats != NULL)
if (wp->response_time)
cc_submit_response_time(wp, CDTIME_T_TO_DOUBLE(cdtime() - start));
if (wp->stats != NULL)
- curl_stats_dispatch(wp->stats, wp->curl,
hostname_g
, "curl", wp->instance);
+ curl_stats_dispatch(wp->stats, wp->curl,
NULL
, "curl", wp->instance);
if (wp->response_code) {
long response_code = 0;
if (wp->response_code) {
long response_code = 0;