summaryrefslogtreecommitdiffstats
path: root/database/rrdcalctemplate.c
diff options
context:
space:
mode:
Diffstat (limited to 'database/rrdcalctemplate.c')
-rw-r--r--database/rrdcalctemplate.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/database/rrdcalctemplate.c b/database/rrdcalctemplate.c
index 007b8c5d6..5060313ec 100644
--- a/database/rrdcalctemplate.c
+++ b/database/rrdcalctemplate.c
@@ -45,6 +45,11 @@ static int rrdcalctemplate_is_there_label_restriction(RRDCALCTEMPLATE *rt, RRDH
}
static inline int rrdcalctemplate_test_additional_restriction(RRDCALCTEMPLATE *rt, RRDSET *st) {
+ if (rt->charts_pattern &&
+ !(simple_pattern_matches(rt->charts_pattern, st->id) ||
+ simple_pattern_matches(rt->charts_pattern, st->name)))
+ return 0;
+
if (rt->family_pattern && !simple_pattern_matches(rt->family_pattern, st->family))
return 0;
@@ -111,6 +116,9 @@ inline void rrdcalctemplate_free(RRDCALCTEMPLATE *rt) {
freez(rt->module_match);
simple_pattern_free(rt->module_pattern);
+ freez(rt->charts_match);
+ simple_pattern_free(rt->charts_pattern);
+
freez(rt->name);
freez(rt->exec);
freez(rt->recipient);