[Asterisk-cvs] asterisk/channels chan_zap.c,1.235,1.236

markster at lists.digium.com markster at lists.digium.com
Thu May 27 12:35:24 CDT 2004


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

Modified Files:
	chan_zap.c 
Log Message:
Unlock PRI lock, fix variable pasing


Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.235
retrieving revision 1.236
diff -u -d -r1.235 -r1.236
--- chan_zap.c	22 May 2004 19:05:53 -0000	1.235
+++ chan_zap.c	27 May 2004 16:50:07 -0000	1.236
@@ -6553,7 +6553,10 @@
 						pri->pvt[chan]->callingpres = e->ring.callingpres;
 						/* Start PBX */
 						if (pri->overlapdial && ast_matchmore_extension(NULL, pri->pvt[chan]->context, pri->pvt[chan]->exten, 1, pri->pvt[chan]->callerid)) {
+							/* Release the PRI lock while we create the channel */
+							ast_mutex_unlock(&pri->lock);
 							c = zt_new(pri->pvt[chan], AST_STATE_RING, 0, SUB_REAL, law, e->ring.ctype);
+							ast_mutex_lock(&pri->lock);
 							if (c && !pthread_create(&threadid, &attr, ss_thread, c)) {
 								if (option_verbose > 2)
 									ast_verbose(VERBOSE_PREFIX_3 "Accepting overlap call from '%s' to '%s' on channel %d, span %d\n",
@@ -6572,7 +6575,10 @@
 								}
 							}
 						} else  {
+							ast_mutex_unlock(&pri->lock);
+							/* Release PRI lock while we create the channel */
 							c = zt_new(pri->pvt[chan], AST_STATE_RING, 1, SUB_REAL, law, e->ring.ctype);
+							ast_mutex_lock(&pri->lock);
 							if (c) {
 								if (option_verbose > 2)
 									ast_verbose(VERBOSE_PREFIX_3 "Accepting call from '%s' to '%s' on channel %d, span %d\n",




More information about the svn-commits mailing list