From 7924ff92e47a247ef705f1824ca9ceafd70dc49e Mon Sep 17 00:00:00 2001 From: Takuro Ashie Date: Fri, 26 Jul 2019 11:19:11 +0900 Subject: [PATCH] match_regex: Accept all data types of meta data match_regex currently accepts only string type of meta data, but there is no reason to reject other data types since they can be easily stringified by meta_data_as_string(). Accepting all data type will provide more benefit, for example the following config can distinguish that data is local or remote, the previous match_regex outputs many error logs for this config though: MetaData "network:received" "true" Signed-off-by: Takuro Ashie --- src/match_regex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/match_regex.c b/src/match_regex.c index 99f0709bd..591d42607 100644 --- a/src/match_regex.c +++ b/src/match_regex.c @@ -342,7 +342,7 @@ static int mr_match(const data_set_t __attribute__((unused)) * ds, /* {{{ */ int status; if (vl->meta == NULL) return nomatch_value; - status = meta_data_get_string(vl->meta, e->key, &value); + status = meta_data_as_string(vl->meta, e->key, &value); if (status == (-ENOENT)) /* key is not present */ return nomatch_value; if (status != 0) /* some other problem */ -- 2.47.2