Merge "res_sorcery_realtime: Fix regex regression."
This commit is contained in:
commit
ae1f728f0f
|
@ -223,7 +223,11 @@ static void sorcery_realtime_retrieve_regex(const struct ast_sorcery *sorcery, v
|
|||
|
||||
/* The realtime API provides no direct ability to do regex so for now we support a limited subset using pattern matching */
|
||||
snprintf(field, sizeof(field), "%s LIKE", UUID_FIELD);
|
||||
if (regex[0] == '^') {
|
||||
snprintf(value, sizeof(value), "%s%%", regex + 1);
|
||||
} else {
|
||||
snprintf(value, sizeof(value), "%%%s%%", regex);
|
||||
}
|
||||
|
||||
if (!(fields = ast_variable_new(field, value, ""))) {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue