[svn-commits] rmudgett: branch rmudgett/t312 r2221 - /team/rmudgett/t312/q931.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Feb 25 17:03:00 CST 2011
Author: rmudgett
Date: Fri Feb 25 17:02:56 2011
New Revision: 2221
URL: http://svnview.digium.com/svn/libpri?view=rev&rev=2221
Log:
Must wait for fake clearing to complete before destroying master call record.
Modified:
team/rmudgett/t312/q931.c
Modified: team/rmudgett/t312/q931.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/t312/q931.c?view=diff&rev=2221&r1=2220&r2=2221
==============================================================================
--- team/rmudgett/t312/q931.c (original)
+++ team/rmudgett/t312/q931.c Fri Feb 25 17:02:56 2011
@@ -4348,9 +4348,11 @@
}
if (cur->fake_clearing_timer) {
- /* Ooops! Upper layer likely just lost a B channel. Must fix! */
- pri_error(ctrl, "BAD! Fake clearing timer was still running. cref:%d\n",
- cur->cr);
+ /*
+ * Must wait for the fake clearing to complete before destroying
+ * the master call record.
+ */
+ return;
}
/* Master call or normal call destruction. */
@@ -5753,10 +5755,17 @@
static void pri_fake_clearing_expiry(void *data)
{
- struct q931_call *call = data;/* Call is not a subcall call record. */
-
- call->fake_clearing_timer = 0;
- pri_fake_clearing(call);
+ struct q931_call *master = data;
+
+ master->fake_clearing_timer = 0;
+ pri_fake_clearing(master);
+ if (!master->t312_timer && !q931_get_subcall_count(master)) {
+ /*
+ * T312 has expired and no slaves are left so we can
+ * destroy the master.
+ */
+ q931_destroycall(master->pri, master);
+ }
}
static void pri_create_fake_clearing(struct pri *ctrl, struct q931_call *master)
More information about the svn-commits
mailing list