char *user;
char *pass;
char *credentials;
- _Bool digest;
- _Bool verify_peer;
- _Bool verify_host;
+ bool digest;
+ bool verify_peer;
+ bool verify_host;
char *cacert;
struct curl_slist *headers;
char *post_body;
- _Bool response_time;
- _Bool response_code;
+ bool response_time;
+ bool response_code;
int timeout;
curl_stats_t *stats;
/*
* Global variables;
*/
-/* static CURLM *curl = NULL; */
-static web_page_t *pages_g = NULL;
+static web_page_t *pages_g;
/*
* Private functions
return -1;
}
- ssnprintf(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
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;
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;