From c2551e9d9f9bd947bff79b0cf80e50fcee8f7fb4 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 24 Feb 2008 15:40:30 +0100 Subject: [PATCH] src/utils_tail_match.c: Submit NAN if type if gauge and no values were matched. --- src/utils_tail_match.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils_tail_match.c b/src/utils_tail_match.c index 06412b9e..34fe2dce 100644 --- a/src/utils_tail_match.c +++ b/src/utils_tail_match.c @@ -72,7 +72,11 @@ static int simple_submit_match (cu_match_t *match, void *user_data) if (match_value == NULL) return (-1); - values[0] = match_value->value; + if ((match_value->ds_type & UTILS_MATCH_DS_TYPE_GAUGE) + && (match_value->values_num == 0)) + values[0].gauge = NAN; + else + values[0] = match_value->value; vl.values = values; vl.values_len = 1; -- 2.30.2