[asterisk-commits] rmudgett: branch rmudgett/bch_shift_v1.6.2 r311926 - /team/rmudgett/bch_shift...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Mar 30 17:41:40 CDT 2011
Author: rmudgett
Date: Wed Mar 30 17:41:34 2011
New Revision: 311926
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311926
Log:
Protect release of channel when no PRI call present.
Modified:
team/rmudgett/bch_shift_v1.6.2/channels/chan_dahdi.c
Modified: team/rmudgett/bch_shift_v1.6.2/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bch_shift_v1.6.2/channels/chan_dahdi.c?view=diff&rev=311926&r1=311925&r2=311926
==============================================================================
--- team/rmudgett/bch_shift_v1.6.2/channels/chan_dahdi.c (original)
+++ team/rmudgett/bch_shift_v1.6.2/channels/chan_dahdi.c Wed Mar 30 17:41:34 2011
@@ -4716,8 +4716,8 @@
#endif
/* Make sure we have a call (or REALLY have a call in the case of a PRI) */
+ pri_grab(p, p->pri);
if (p->call && (!p->bearer || (p->bearer->call == p->call))) {
- pri_grab(p, p->pri);
if (p->alreadyhungup) {
ast_debug(1, "Already hungup... Calling hangup once, and clearing call\n");
@@ -4747,17 +4747,15 @@
}
pri_hangup(p->pri->pri, p->call, icause);
}
- p->allocated = 0;
- p->owner = NULL;
- pri_rel(p->pri);
} else {
if (p->bearer)
ast_debug(1, "Bearer call is %p, while ours is still %p\n", p->bearer->call, p->call);
p->call = NULL;
- p->allocated = 0;
- p->owner = NULL;
- res = 0;
- }
+ }
+ p->allocated = 0;
+ p->owner = NULL;
+ pri_rel(p->pri);
+ res = 0;
} else
#endif /* defined(HAVE_PRI) */
{
More information about the asterisk-commits
mailing list