[asterisk-commits] qwell: trunk r270981 - in /trunk: ./ channels/chan_agent.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 16 16:10:51 CDT 2010


Author: qwell
Date: Wed Jun 16 16:10:48 2010
New Revision: 270981

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=270981
Log:
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.
........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_agent.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_agent.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_agent.c?view=diff&rev=270981&r1=270980&r2=270981
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Wed Jun 16 16:10:48 2010
@@ -2289,7 +2289,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