[Asterisk-cvs] asterisk/channels chan_zap.c,1.205,1.206
markster at lists.digium.com
markster at lists.digium.com
Mon Apr 12 17:58:13 CDT 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv16444/channels
Modified Files:
chan_zap.c
Log Message:
Lock on indication too
Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.205
retrieving revision 1.206
diff -u -d -r1.205 -r1.206
--- chan_zap.c 10 Apr 2004 03:46:59 -0000 1.205
+++ chan_zap.c 12 Apr 2004 22:00:12 -0000 1.206
@@ -3855,7 +3855,9 @@
{
struct zt_pvt *p = chan->pvt->pvt;
int res=-1;
- int index = zt_get_index(chan, p, 0);
+ int index;
+ ast_mutex_lock(&p->lock);
+ index = zt_get_index(chan, p, 0);
if (index == SUB_REAL) {
switch(condition) {
case AST_CONTROL_BUSY:
@@ -3917,6 +3919,7 @@
}
} else
res = 0;
+ ast_mutex_unlock(&p->lock);
return res;
}
More information about the svn-commits
mailing list