dect
/
asterisk
Archived
13
0
Fork 0

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/trunk@270981 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
qwell 2010-06-16 21:10:48 +00:00
parent db405545ae
commit bf4f9e2c71
1 changed files with 2 additions and 0 deletions

View File

@ -2289,7 +2289,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';