summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 27833e4)
raw | patch | inline | side by side (parent: 27833e4)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 23 Nov 2008 18:07:10 +0000 (19:07 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 23 Nov 2008 18:07:10 +0000 (19:07 +0100) |
Before, when there were multiple regular expressions for the same field,
for example the host, only of of those regular expressions needed to
match for a successful overall match.
The new behavior is not that *all* regular expressions need to match for
a successful overall match. This makes the behavior much easier to
understand.
for example the host, only of of those regular expressions needed to
match for a successful overall match.
The new behavior is not that *all* regular expressions need to match for
a successful overall match. This makes the behavior much easier to
understand.
src/match_regex.c | patch | blob | history |
diff --git a/src/match_regex.c b/src/match_regex.c
index 15f3c7743029dcf50a9e9649b3f3824d405018f5..9233d803ede5c4113333e38bef74732b6fbb5131 100644 (file)
--- a/src/match_regex.c
+++ b/src/match_regex.c
{
DEBUG ("regex match: Regular expression `%s' matches `%s'.",
re->re_str, string);
- return (FC_MATCH_MATCHES);
}
else
{
DEBUG ("regex match: Regular expression `%s' does not match `%s'.",
re->re_str, string);
+ return (FC_MATCH_NO_MATCH);
}
}
- return (FC_MATCH_NO_MATCH);
+ return (FC_MATCH_MATCHES);
} /* }}} int mr_match_regexen */
static int mr_config_add_regex (mr_regex_t **re_head, /* {{{ */