summaryrefslogtreecommitdiffstats
path: root/libnetdata/simple_pattern
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-26 17:10:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-26 17:10:03 +0000
commit271f618a49421e87945c1f68b59a8775469390d5 (patch)
tree166cbc9497e13b878bdd7043ca58f6b3da006f2a /libnetdata/simple_pattern
parentAdding upstream version 1.43.0. (diff)
downloadnetdata-271f618a49421e87945c1f68b59a8775469390d5.tar.xz
netdata-271f618a49421e87945c1f68b59a8775469390d5.zip
Adding upstream version 1.43.1.upstream/1.43.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libnetdata/simple_pattern')
-rw-r--r--libnetdata/simple_pattern/simple_pattern.c8
1 files changed, 8 insertions, 0 deletions
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;