struct web_match_s /* {{{ */
{
char *regex;
+ char *exclude_regex;
int dstype;
char *type;
char *instance;
if (strcasecmp ("Regex", child->key) == 0)
status = cmc_config_add_string ("Regex", &match->regex, child);
+ else if (strcasecmp ("ExcludeRegex", child->key) == 0)
+ status = cmc_config_add_string ("ExcludeRegex", &match->exclude_regex, child);
else if (strcasecmp ("DSType", child->key) == 0)
status = cmc_config_add_match_dstype (&match->dstype, child);
else if (strcasecmp ("Type", child->key) == 0)
} /* while (status == 0) */
if (status != 0)
+ {
+ cmc_web_match_free (match);
return (status);
+ }
- match->match = match_create_simple (match->regex, match->dstype);
+ match->match = match_create_simple (match->regex, match->exclude_regex,
+ match->dstype);
if (match->match == NULL)
{
ERROR ("memcachec plugin: tail_match_add_match_simple failed.");
if (strcasecmp ("Server", child->key) == 0)
status = cmc_config_add_string ("Server", &page->server, child);
- if (strcasecmp ("Key", child->key) == 0)
+ else if (strcasecmp ("Key", child->key) == 0)
status = cmc_config_add_string ("Key", &page->key, child);
else if (strcasecmp ("Match", child->key) == 0)
/* Be liberal with failing matches => don't set `status'. */
vl.values = values;
vl.values_len = 1;
- vl.time = time (NULL);
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "memcachec", sizeof (vl.plugin));
sstrncpy (vl.plugin_instance, wp->instance, sizeof (vl.plugin_instance));
}
cmc_submit (wp, wm, mv);
+ match_value_reset (mv);
} /* for (wm = wp->matches; wm != NULL; wm = wm->next) */
sfree (wp->buffer);