X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fcurl.c;h=35ec1f8391f8a3b152b7c33d370fb7018047bfd3;hp=d1957d2d027087c7d3f508993c6f6a19933d181a;hb=7111bb6df7628edce3a8e538b386fbe27633a191;hpb=b2ea1d933eb97c6dbbf523540bbc072db961eb9b diff --git a/src/curl.c b/src/curl.c index d1957d2d..35ec1f83 100644 --- a/src/curl.c +++ b/src/curl.c @@ -370,8 +370,8 @@ static int cc_page_init_curl(web_page_t *wp) /* {{{ */ 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 @@ -438,7 +438,7 @@ static int cc_config_add_page(oconfig_item_t *ci) /* {{{ */ for (int i = 0; i < ci->children_num; i++) { oconfig_item_t *child = ci->children + i; - if (strcasecmp("PluginName", child->key) == 0) + if (strcasecmp("Plugin", child->key) == 0) status = cf_util_get_string(child, &page->plugin_name); else if (strcasecmp("URL", child->key) == 0) status = cf_util_get_string(child, &page->url); @@ -631,7 +631,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) - 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;