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
This commit is contained in:
parent
e08247218e
commit
c278f09897
4
pbx.c
4
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);
|
||||
|
|
Loading…
Reference in New Issue