[asterisk-commits] qwell: branch 1.4 r270980 - /branches/1.4/channels/chan_agent.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jun 16 16:10:13 CDT 2010
Author: qwell
Date: Wed Jun 16 16:10:09 2010
New Revision: 270980
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=270980
Log:
Need to lock the agent chan before access its internal bits.
Pointed out by russellb on asterisk-dev mailing list.
Modified:
branches/1.4/channels/chan_agent.c
Modified: branches/1.4/channels/chan_agent.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/channels/chan_agent.c?view=diff&rev=270980&r1=270979&r2=270980
==============================================================================
--- branches/1.4/channels/chan_agent.c (original)
+++ branches/1.4/channels/chan_agent.c Wed Jun 16 16:10:09 2010
@@ -2790,7 +2790,9 @@
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';
More information about the asterisk-commits
mailing list