From 6cf8f2d5174a53f582e61d715edbb88d6e3367cc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 14 Jun 2023 21:20:33 +0200 Subject: Adding upstream version 1.40.0. Signed-off-by: Daniel Baumann --- database/rrdcalctemplate.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'database/rrdcalctemplate.c') diff --git a/database/rrdcalctemplate.c b/database/rrdcalctemplate.c index 4dacb6c7b..53630f99c 100644 --- a/database/rrdcalctemplate.c +++ b/database/rrdcalctemplate.c @@ -51,6 +51,11 @@ bool rrdcalctemplate_check_rrdset_conditions(RRDCALCTEMPLATE *rt, RRDSET *st, RR '=', NULL)) return false; + if(st->rrdlabels && rt->chart_labels_pattern && !rrdlabels_match_simple_pattern_parsed(st->rrdlabels, + rt->chart_labels_pattern, + '=', NULL)) + return false; + return true; } @@ -120,8 +125,10 @@ static void rrdcalctemplate_free_internals(RRDCALCTEMPLATE *rt) { string_freez(rt->dimensions); string_freez(rt->foreach_dimension); string_freez(rt->host_labels); + string_freez(rt->chart_labels); simple_pattern_free(rt->foreach_dimension_pattern); simple_pattern_free(rt->host_labels_pattern); + simple_pattern_free(rt->chart_labels_pattern); } void rrdcalctemplate_free_unused_rrdcalctemplate_loaded_from_config(RRDCALCTEMPLATE *rt) { -- cgit v1.2.3