summaryrefslogtreecommitdiffstats
path: root/libnetdata/simple_pattern
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-26 17:10:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-26 17:10:18 +0000
commitbb3cae2edeb7b698c9dfcbe74df9eb17d03c771b (patch)
tree55748ed1435e5a5221b91426ecd284ffa1fe7094 /libnetdata/simple_pattern
parentReleasing debian version 1.43.0-1. (diff)
downloadnetdata-bb3cae2edeb7b698c9dfcbe74df9eb17d03c771b.tar.xz
netdata-bb3cae2edeb7b698c9dfcbe74df9eb17d03c771b.zip
Merging upstream version 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 70bde73a..a0051e8f 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;