issue #5604
authorKevin P. Fleming <kpfleming@digium.com>
Tue, 8 Nov 2005 20:38:10 +0000 (20:38 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Tue, 8 Nov 2005 20:38:10 +0000 (20:38 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7031 65c4cc65-6c06-0410-ace0-fbb531ad65f3

ChangeLog
channels/chan_local.c

index 7910683..3d0d95c 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2005-11-08  Kevin P. Fleming  <kpfleming@digium.com>
 
+       * channels/chan_local.c (local_call): move channel variables from incoming to outgoing instead of inheriting them (issue #5604)
+
        * many files: add explicit include of stdio.h (issue #5650)
 
 2005-11-07  Kevin P. Fleming  <kpfleming@digium.com>
index 6a4cc0c..6dec650 100755 (executable)
@@ -345,7 +345,9 @@ static int local_call(struct ast_channel *ast, char *dest, int timeout)
        strncpy(p->chan->language, p->owner->language, sizeof(p->chan->language) - 1);
        strncpy(p->chan->accountcode, p->owner->accountcode, sizeof(p->chan->accountcode) - 1);
        p->chan->cdrflags = p->owner->cdrflags;
-       ast_channel_inherit_variables(p->owner, p->chan);
+       /* move the channel variables from the incoming channel to the outgoing channel */
+       AST_LIST_HEAD_SET_NOLOCK(&p->chan->varshead, AST_LIST_FIRST(&p->owner->varshead));
+       AST_LIST_HEAD_INIT_NOLOCK(&p->owner->varshead);
        p->launchedpbx = 1;
 
        /* Start switch on sub channel */