mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-07 18:38:02 +00:00
Make sure patterns are always last (bug #2435)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
6
pbx.c
6
pbx.c
@@ -3830,6 +3830,12 @@ int ast_add_extension2(struct ast_context *con,
|
|||||||
}
|
}
|
||||||
e = con->root;
|
e = con->root;
|
||||||
while(e) {
|
while(e) {
|
||||||
|
/* Make sure patterns are always last! */
|
||||||
|
if ((e->exten[0] != '_') && (extension[0] == '_'))
|
||||||
|
res = -1;
|
||||||
|
else if ((e->exten[0] == '_') && (extension[0] != '_'))
|
||||||
|
res = 1;
|
||||||
|
else
|
||||||
res= strcmp(e->exten, extension);
|
res= strcmp(e->exten, extension);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
if (!e->matchcid && !tmp->matchcid)
|
if (!e->matchcid && !tmp->matchcid)
|
||||||
|
|||||||
Reference in New Issue
Block a user