Copy context properly
authorMark Spencer <markster@digium.com>
Sun, 7 Sep 2003 00:12:29 +0000 (00:12 +0000)
committerMark Spencer <markster@digium.com>
Sun, 7 Sep 2003 00:12:29 +0000 (00:12 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1483 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_agent.c

index a2998e3..d293f9c 100755 (executable)
@@ -806,6 +806,7 @@ static int check_availability(struct agent_pvt *newlyavailable, int needlock)
                                newlyavailable->acknowledged = 1;
                                ast_setstate(parent, AST_STATE_UP);
                                ast_setstate(chan, AST_STATE_UP);
+                               strncpy(parent->context, chan->context, sizeof(parent->context) - 1);
                                /* Go ahead and mark the channel as a zombie so that masquerade will
                                   destroy it for us, and we need not call ast_hangup */
                                ast_mutex_lock(&parent->lock);