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
This commit is contained in:
parent
de7e9fe95b
commit
73bce50ef8
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue