aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-27 16:50:07 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-27 16:50:07 +0000
commit4a66d3fb26970b7cad8268de548ff5eccf9929ea (patch)
treef14ca9db4e732aef3645b152b1a467febe22927c /channels
parentf8c5bd56232b64b9ca91320c09198840b5f5239a (diff)
Unlock PRI lock, fix variable pasing
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3093 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_zap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 5c7ab784a..eed2849c3 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -6553,7 +6553,10 @@ static void *pri_dchannel(void *vpri)
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 @@ static void *pri_dchannel(void *vpri)
}
}
} 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",