[asterisk-commits] rmudgett: branch rmudgett/bch_shift_v1.8 r311674 - /team/rmudgett/bch_shift_v...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Mar 24 18:02:27 CDT 2011
Author: rmudgett
Date: Thu Mar 24 18:02:23 2011
New Revision: 311674
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311674
Log:
Make sure that the last call has completed hanging up before setting up for the new.
Modified:
team/rmudgett/bch_shift_v1.8/channels/chan_dahdi.c
team/rmudgett/bch_shift_v1.8/channels/sig_pri.c
Modified: team/rmudgett/bch_shift_v1.8/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bch_shift_v1.8/channels/chan_dahdi.c?view=diff&rev=311674&r1=311673&r2=311674
==============================================================================
--- team/rmudgett/bch_shift_v1.8/channels/chan_dahdi.c (original)
+++ team/rmudgett/bch_shift_v1.8/channels/chan_dahdi.c Thu Mar 24 18:02:23 2011
@@ -6408,11 +6408,9 @@
p->cidspill = NULL;
ast_mutex_unlock(&p->lock);
- ast_module_unref(ast_module_info->self);
ast_verb(3, "Hungup '%s'\n", ast->name);
ast_mutex_lock(&iflock);
-
if (p->restartpending) {
num_restart_pending--;
}
@@ -6421,6 +6419,8 @@
destroy_channel(p, 0);
}
ast_mutex_unlock(&iflock);
+
+ ast_module_unref(ast_module_info->self);
return 0;
}
@@ -13417,6 +13417,14 @@
tmp = analog_request(p->sig_pvt, &callwait, requestor);
#ifdef HAVE_PRI
} else if (dahdi_sig_pri_lib_handles(p->sig)) {
+ /*
+ * We already have the B channel reserved for this call. We
+ * just need to make sure that dahdi_hangup() has completed
+ * cleaning up before continuing.
+ */
+ ast_mutex_lock(&p->lock);
+ ast_mutex_unlock(&p->lock);
+
sig_pri_extract_called_num_subaddr(p->sig_pvt, data, p->dnid,
sizeof(p->dnid));
tmp = sig_pri_request(p->sig_pvt, SIG_PRI_DEFLAW, requestor, transcapdigital);
Modified: team/rmudgett/bch_shift_v1.8/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bch_shift_v1.8/channels/sig_pri.c?view=diff&rev=311674&r1=311673&r2=311674
==============================================================================
--- team/rmudgett/bch_shift_v1.8/channels/sig_pri.c (original)
+++ team/rmudgett/bch_shift_v1.8/channels/sig_pri.c Thu Mar 24 18:02:23 2011
@@ -4549,6 +4549,13 @@
* threads can send D channel messages.
*/
ast_mutex_unlock(&pri->lock);
+ /*
+ * We already have the B channel reserved for this call. We
+ * just need to make sure that sig_pri_hangup() has completed
+ * cleaning up before continuing.
+ */
+ sig_pri_lock_private(pri->pvts[nextidle]);
+ sig_pri_unlock_private(pri->pvts[nextidle]);
idle = sig_pri_request(pri->pvts[nextidle], AST_FORMAT_ULAW, NULL, 0);
ast_mutex_lock(&pri->lock);
if (idle) {
More information about the asterisk-commits
mailing list