mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
Merge "res_sorcery_realtime: Fix regex regression."
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user