summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Golovich <james@gnuinter.net>2004-02-23 02:47:22 +0000
committerJames Golovich <james@gnuinter.net>2004-02-23 02:47:22 +0000
commitc278f09897bf0275b14891df8c53b17911f70482 (patch)
treeb4bc1e4958406f0d0d22749f51a7c3677aefcb72
parente08247218e0eb46d1881a60523410b9da7d94956 (diff)
Fix ast_add_extension2 updating ast_exten correctly in certain cases
where extensions.conf is not ordered numerically by priority (bug #1065) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rwxr-xr-xpbx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pbx.c b/pbx.c
index 7e35f0032..106091d27 100755
--- a/pbx.c
+++ b/pbx.c
@@ -3732,9 +3732,9 @@ int ast_add_extension2(struct ast_context *con,
tmp->peer = e;
} else {
/* We're the very first extension altogether */
- tmp->next = con->root;
+ tmp->next = con->root->next;
/* Con->root must always exist or we couldn't get here */
- tmp->peer = con->root->peer;
+ tmp->peer = con->root;
con->root = tmp;
}
ast_mutex_unlock(&con->lock);