[Asterisk-cvs] asterisk/channels chan_agent.c,1.54,1.55

markster at lists.digium.com markster at lists.digium.com
Sat Sep 6 14:08:59 CDT 2003


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv16179/channels

Modified Files:
	chan_agent.c 
Log Message:
Be sure we have the agent lock


Index: chan_agent.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_agent.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** chan_agent.c	4 Sep 2003 04:03:47 -0000	1.54
--- chan_agent.c	6 Sep 2003 19:10:08 -0000	1.55
***************
*** 1214,1217 ****
--- 1214,1218 ----
  									break;
  
+ 								ast_mutex_lock(&agentlock);
  								ast_mutex_lock(&p->lock);
  								if (p->lastdisc.tv_sec) {
***************
*** 1228,1231 ****
--- 1229,1233 ----
  								}
  								ast_mutex_unlock(&p->lock);
+ 								ast_mutex_unlock(&agentlock);
  								/*	Synchronize channel ownership between call to agent and itself. */
  								ast_mutex_lock( &p->app_lock );
***************
*** 1240,1246 ****
--- 1242,1250 ----
  								ast_mutex_unlock( &p->app_lock );
  								if ((p->ackcall > 1)  && (res == 1)) {
+ 									ast_mutex_lock(&agentlock);
  									ast_mutex_lock(&p->lock);
  									check_availability(p, 0);
  									ast_mutex_unlock(&p->lock);
+ 									ast_mutex_unlock(&agentlock);
  									res = 0;
  								}




More information about the svn-commits mailing list