From 102d28c11a0f74c275613f893e9708b5ab2b4e11 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Mon, 1 Aug 2016 16:08:15 +0000 Subject: sorcery: Use more compatible regex for local expressions. This changes the use of an empty regex for both res_sorcery_config and res_sorcery_memory to "." instead. This is a more compatible regular expression which also works on FreeBSD. ASTERISK-26206 #close Change-Id: Ia9166dd176f1597555ba22b6931180d0626c1388 --- res/res_sorcery_memory.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'res/res_sorcery_memory.c') diff --git a/res/res_sorcery_memory.c b/res/res_sorcery_memory.c index e8f603038..b2f05591b 100644 --- a/res/res_sorcery_memory.c +++ b/res/res_sorcery_memory.c @@ -188,6 +188,10 @@ static void sorcery_memory_retrieve_regex(const struct ast_sorcery *sorcery, voi .regex = &expression, }; + if (ast_strlen_zero(regex)) { + regex = "."; + } + if (regcomp(&expression, regex, REG_EXTENDED | REG_NOSUB)) { return; } -- cgit v1.2.3