diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-06-16 21:11:28 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-06-16 21:11:28 +0000 |
commit | 0cb76eef627154cf317deefffc8db728afe9dbaa (patch) | |
tree | 0a34d97388f250621639b895d1dbc5256ccb2feb /channels | |
parent | ec0dc9ade2b3a4fa9f2ce21f17caed8fcb9a72f8 (diff) |
Merged revisions 270981 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r270981 | qwell | 2010-06-16 16:10:48 -0500 (Wed, 16 Jun 2010) | 11 lines
Merged revisions 270980 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r270980 | qwell | 2010-06-16 16:10:09 -0500 (Wed, 16 Jun 2010) | 4 lines
Need to lock the agent chan before access its internal bits.
Pointed out by russellb on asterisk-dev mailing list.
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@270982 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_agent.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c index e4706ac78..ddfb74ae2 100644 --- a/channels/chan_agent.c +++ b/channels/chan_agent.c @@ -2538,7 +2538,9 @@ static int function_agent(struct ast_channel *chan, const char *cmd, char *data, ast_copy_string(buf, agent->moh, len); else if (!strcasecmp(args.item, "channel")) { if (agent->chan) { + ast_channel_lock(agent->chan); ast_copy_string(buf, agent->chan->name, len); + ast_channel_unlock(agent->chan); tmp = strrchr(buf, '-'); if (tmp) *tmp = '\0'; |