summaryrefslogtreecommitdiff
path: root/res/res_sorcery_memory.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-08-01 16:08:15 +0000
committerJoshua Colp <jcolp@digium.com>2016-08-02 10:25:16 +0000
commit102d28c11a0f74c275613f893e9708b5ab2b4e11 (patch)
treee9edaeb9cb19273631f13be07da6ebf79c1bea8e /res/res_sorcery_memory.c
parentf2a93dc9f2ca05bc0e03c64a8f3d368caf394628 (diff)
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
Diffstat (limited to 'res/res_sorcery_memory.c')
-rw-r--r--res/res_sorcery_memory.c4
1 files changed, 4 insertions, 0 deletions
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;
}