summaryrefslogtreecommitdiff
path: root/res/res_sorcery_config.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 05:25:36 -0500
commit73bce50ef82c5a61f857ad1af0d63efd4175ac23 (patch)
treee7f570ead6cd1b9dd3dcaa6f7c825310cd6bbd83 /res/res_sorcery_config.c
parentde7e9fe95b7052b8c8ee8a669c087901eab867a9 (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_config.c')
-rw-r--r--res/res_sorcery_config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/res/res_sorcery_config.c b/res/res_sorcery_config.c
index dd4ea8886..6059a529d 100644
--- a/res/res_sorcery_config.c
+++ b/res/res_sorcery_config.c
@@ -210,6 +210,10 @@ static void sorcery_config_retrieve_regex(const struct ast_sorcery *sorcery, voi
.regex = &expression,
};
+ if (ast_strlen_zero(regex)) {
+ regex = ".";
+ }
+
if (!config_objects || regcomp(&expression, regex, REG_EXTENDED | REG_NOSUB)) {
return;
}