mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-09 14:36:48 +00:00
Merge "sorcery: Use more compatible regex for local expressions." into 13
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user