Skip to content
Snippets Groups Projects
Commit ae1f728f authored by Joshua Colp's avatar Joshua Colp Committed by Gerrit Code Review
Browse files

Merge "res_sorcery_realtime: Fix regex regression."

parents 4b768281 65223618
No related branches found
No related tags found
No related merge requests found
......@@ -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);
snprintf(value, sizeof(value), "%%%s%%", regex);
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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment