]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_sorcery_realtime: Remove leading ^ requirement. 91/1991/2
authorMark Michelson <mmichelson@digium.com>
Tue, 12 Jan 2016 16:36:15 +0000 (10:36 -0600)
committerMark Michelson <mmichelson@digium.com>
Tue, 12 Jan 2016 19:04:49 +0000 (13:04 -0600)
commit4cd58c3b20e04e1acd3d77c964dc1dd9a7b85d74
treea857cd1516dcec20fb45246d38ae778827d8f94c
parentace79fadad4c551c7d5185011c0e9e208b60175e
res_sorcery_realtime: Remove leading ^ requirement.

res_sorcery_realtime's search-by-regex callback performed a check to
ensure that the passed-in regex began with a caret (^). If it did not,
then no results would be returned.

This callback only started to become used when "like" support was added
to PJSIP CLI commands. The CLI command for listing objects would pass an
empty regex ("") to the sorcery backend if no "like" statement was
present. For most sorcery backends, this resulted in returning all
objects. However, for realtime, this resulted in returning no objects.

This commit seeks to fix the regression by removing the requirement from
res_sorcery_realtime for the passed-in-regex to begin with a caret.

ASTERISK-25689 #close
Reported by Marcelo Terres

Change-Id: I22b4dc5d7f3f11bb29ac2e42ef94682e9bab3b20
res/res_sorcery_realtime.c
tests/test_sorcery_realtime.c