From 271f618a49421e87945c1f68b59a8775469390d5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 26 Oct 2023 19:10:03 +0200 Subject: Adding upstream version 1.43.1. Signed-off-by: Daniel Baumann --- libnetdata/simple_pattern/simple_pattern.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libnetdata/simple_pattern') diff --git a/libnetdata/simple_pattern/simple_pattern.c b/libnetdata/simple_pattern/simple_pattern.c index 70bde73a6..a0051e8f0 100644 --- a/libnetdata/simple_pattern/simple_pattern.c +++ b/libnetdata/simple_pattern/simple_pattern.c @@ -144,6 +144,14 @@ SIMPLE_PATTERN *simple_pattern_create(const char *list, const char *separators, m->negative = negative; m->case_sensitive = case_sensitive; + if(default_mode == SIMPLE_PATTERN_SUBSTRING) { + m->mode = SIMPLE_PATTERN_SUBSTRING; + + struct simple_pattern *tm = m; + for(tm = m; tm->child ; tm = tm->child) ; + tm->mode = SIMPLE_PATTERN_SUBSTRING; + } + // link it at the end if(unlikely(!root)) root = last = m; -- cgit v1.2.3