aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-21 23:07:46 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-21 23:07:46 +0000
commit5827c440cd9b1f0134448f6cd220143c455ae805 (patch)
tree56bb1d1081a92b06e1cecdb93fd7d13d86a1977d
parenta09fc51a9f76fda0ecc7806e1c6d47d7c5dca95b (diff)
The passed extension may not be the same in the list as the current entry,
because we strip spaces when copying the extension into the structure. Therefore, use the copied item to place the item into the list. (found by lmadsen on -dev, fixed by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@158600 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/pbx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c
index e324d0489..99ecee92b 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -4826,7 +4826,7 @@ int ast_add_extension2(struct ast_context *con,
ast_mutex_lock(&con->lock);
res = 0; /* some compilers will think it is uninitialized otherwise */
for (e = con->root; e; el = e, e = e->next) { /* scan the extension list */
- res = ext_cmp(e->exten, extension);
+ res = ext_cmp(e->exten, tmp->exten);
if (res == 0) { /* extension match, now look at cidmatch */
if (!e->matchcid && !tmp->matchcid)
res = 0;