X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcurl.c;h=31cda39a2514f8d0a1993d4482e8525dbdb35cb0;hb=e35f3c5c634216860f14586a7d17232022d8b588;hp=6e2811c81d2555060755ea562297f7cbedefd76f;hpb=0b66874cd75b00f8daf8a18a10712dff8be68da9;p=collectd.git diff --git a/src/curl.c b/src/curl.c index 6e2811c8..31cda39a 100644 --- a/src/curl.c +++ b/src/curl.c @@ -37,6 +37,7 @@ typedef struct web_match_s web_match_t; struct web_match_s /* {{{ */ { char *regex; + char *exclude_regex; int dstype; char *type; char *instance; @@ -291,6 +292,8 @@ static int cc_config_add_match (web_page_t *page, /* {{{ */ if (strcasecmp ("Regex", child->key) == 0) status = cc_config_add_string ("Regex", &match->regex, child); + else if (strcasecmp ("ExcludeRegex", child->key) == 0) + status = cc_config_add_string ("ExcludeRegex", &match->exclude_regex, child); else if (strcasecmp ("DSType", child->key) == 0) status = cc_config_add_match_dstype (&match->dstype, child); else if (strcasecmp ("Type", child->key) == 0) @@ -333,7 +336,8 @@ static int cc_config_add_match (web_page_t *page, /* {{{ */ if (status != 0) return (status); - match->match = match_create_simple (match->regex, NULL, match->dstype); + match->match = match_create_simple (match->regex, match->exclude_regex, + match->dstype); if (match->match == NULL) { ERROR ("curl plugin: tail_match_add_match_simple failed."); @@ -366,6 +370,7 @@ static int cc_page_init_curl (web_page_t *wp) /* {{{ */ return (-1); } + curl_easy_setopt (wp->curl, CURLOPT_NOSIGNAL, 1); curl_easy_setopt (wp->curl, CURLOPT_WRITEFUNCTION, cc_curl_callback); curl_easy_setopt (wp->curl, CURLOPT_WRITEDATA, wp); curl_easy_setopt (wp->curl, CURLOPT_USERAGENT,