[asterisk-commits] russell: branch 1.4 r101413 - /branches/1.4/channels/chan_agent.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 31 13:04:52 CST 2008


Author: russell
Date: Thu Jan 31 13:04:52 2008
New Revision: 101413

URL: http://svn.digium.com/view/asterisk?view=rev&rev=101413
Log:
Add missing locking to the find_agent() function.

Modified:
    branches/1.4/channels/chan_agent.c

Modified: branches/1.4/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_agent.c?view=diff&rev=101413&r1=101412&r2=101413
==============================================================================
--- branches/1.4/channels/chan_agent.c (original)
+++ branches/1.4/channels/chan_agent.c Thu Jan 31 13:04:52 2008
@@ -2572,10 +2572,12 @@
 {
 	struct agent_pvt *cur;
 
+	AST_LIST_LOCK(&agents);
 	AST_LIST_TRAVERSE(&agents, cur, list) {
 		if (!strcmp(cur->agent, agentid))
 			break;	
 	}
+	AST_LIST_UNLOCK(&agents);
 
 	return cur;	
 }




More information about the asterisk-commits mailing list