mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-09 22:45:49 +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,
|
.regex = &expression,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (ast_strlen_zero(regex)) {
|
||||||
|
regex = ".";
|
||||||
|
}
|
||||||
|
|
||||||
if (!config_objects || regcomp(&expression, regex, REG_EXTENDED | REG_NOSUB)) {
|
if (!config_objects || regcomp(&expression, regex, REG_EXTENDED | REG_NOSUB)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -188,6 +188,10 @@ static void sorcery_memory_retrieve_regex(const struct ast_sorcery *sorcery, voi
|
|||||||
.regex = &expression,
|
.regex = &expression,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (ast_strlen_zero(regex)) {
|
||||||
|
regex = ".";
|
||||||
|
}
|
||||||
|
|
||||||
if (regcomp(&expression, regex, REG_EXTENDED | REG_NOSUB)) {
|
if (regcomp(&expression, regex, REG_EXTENDED | REG_NOSUB)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user