From: Florian Forster Date: Sun, 24 Feb 2008 14:40:30 +0000 (+0100) Subject: src/utils_tail_match.c: Submit NAN if type if gauge and no values were matched. X-Git-Tag: collectd-4.4.0~89^2~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c2551e9d9f9bd947bff79b0cf80e50fcee8f7fb4;p=collectd.git src/utils_tail_match.c: Submit NAN if type if gauge and no values were matched. --- 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;