Fix the actual place that was pointed out, for previous commit.
authorJason Parker <jparker@digium.com>
Wed, 16 Jun 2010 21:12:25 +0000 (21:12 +0000)
committerJason Parker <jparker@digium.com>
Wed, 16 Jun 2010 21:12:25 +0000 (21:12 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270983 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_agent.c

index 0b15903..3451de2 100644 (file)
@@ -2298,7 +2298,9 @@ static int function_agent(struct ast_channel *chan, const char *cmd, char *data,
                } 
        } else if (!strcasecmp(args.item, "fullchannel")) {
                if (agent->chan) {
+                       ast_channel_lock(agent->chan);
                        ast_copy_string(buf, agent->chan->name, len);
+                       ast_channel_unlock(agent->chan);
                } 
        } else if (!strcasecmp(args.item, "exten")) {
                buf[0] = '\0';