[Asterisk-cvs] asterisk/channels chan_zap.c,1.274,1.275
markster at lists.digium.com
markster at lists.digium.com
Fri Jun 18 11:38:32 CDT 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv14889/channels
Modified Files:
chan_zap.c
Log Message:
Be sure we hold channel lock in write before talking to PRI channel
Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.274
retrieving revision 1.275
diff -u -d -r1.274 -r1.275
--- chan_zap.c 17 Jun 2004 14:53:25 -0000 1.274
+++ chan_zap.c 18 Jun 2004 15:24:29 -0000 1.275
@@ -3994,7 +3994,6 @@
int res;
unsigned char outbuf[4096];
int index;
-
index = zt_get_index(ast, p, 0);
if (index < 0) {
ast_log(LOG_WARNING, "%s doesn't really exist?\n", ast->name);
@@ -4002,6 +4001,7 @@
}
#ifdef ZAPATA_PRI
+ ast_mutex_lock(&p->lock);
if (!p->proceeding && p->sig==SIG_PRI && p->pri && !p->outgoing) {
if (p->pri->pri) {
if (!pri_grab(p, p->pri)) {
@@ -4012,6 +4012,7 @@
}
p->proceeding=1;
}
+ ast_mutex_unlock(&p->lock);
#endif
/* Write a frame of (presumably voice) data */
if (frame->frametype != AST_FRAME_VOICE) {
More information about the svn-commits
mailing list