[asterisk-commits] kpfleming: branch 1.4 r147430 - /branches/1.4/channels/chan_dahdi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Oct 7 18:14:57 CDT 2008
Author: kpfleming
Date: Tue Oct 7 18:14:57 2008
New Revision: 147430
URL: http://svn.digium.com/view/asterisk?view=rev&rev=147430
Log:
revert this change until i can understand why it results in locking order changes
Modified:
branches/1.4/channels/chan_dahdi.c
Modified: branches/1.4/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_dahdi.c?view=diff&rev=147430&r1=147429&r2=147430
==============================================================================
--- branches/1.4/channels/chan_dahdi.c (original)
+++ branches/1.4/channels/chan_dahdi.c Tue Oct 7 18:14:57 2008
@@ -9080,16 +9080,10 @@
}
pthread_attr_destroy(&attr);
} else {
+ ast_mutex_unlock(&pri->lock);
/* Release PRI lock while we create the channel */
- ast_mutex_unlock(&pri->lock);
-
- if (!(c = dahdi_new(pri->pvts[chanpos], AST_STATE_RING, 0, SUB_REAL, law, e->ring.ctype))) {
- ast_mutex_lock(&pri->lock);
- ast_log(LOG_WARNING, "Unable to create channel for %d/%d, span %d\n",
- pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
- pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_SWITCH_CONGESTION);
- pri->pvts[chanpos]->call = NULL;
- } else {
+ c = dahdi_new(pri->pvts[chanpos], AST_STATE_RING, 1, SUB_REAL, law, e->ring.ctype);
+ if (c) {
char calledtonstr[10];
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
@@ -9116,17 +9110,17 @@
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Accepting call from '%s' to '%s' on channel %d/%d, span %d\n",
- plancallingnum, pri->pvts[chanpos]->exten,
- pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
- if (ast_pbx_start(c)) {
- ast_log(LOG_WARNING, "Unable to start PBX on %s\n", c->name);
- ast_hangup(c);
- pri->pvts[chanpos]->owner = NULL;
- pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_SWITCH_CONGESTION);
- pri->pvts[chanpos]->call = NULL;
- } else {
- dahdi_enable_ec(pri->pvts[chanpos]);
- }
+ plancallingnum, pri->pvts[chanpos]->exten,
+ pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
+ dahdi_enable_ec(pri->pvts[chanpos]);
+ } else {
+
+ ast_mutex_lock(&pri->lock);
+
+ ast_log(LOG_WARNING, "Unable to start PBX on channel %d/%d, span %d\n",
+ pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
+ pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_SWITCH_CONGESTION);
+ pri->pvts[chanpos]->call = NULL;
}
}
} else {
More information about the asterisk-commits
mailing list