aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);