[svn-commits] rmudgett: branch rmudgett/bch_shift_v1.8 r311604 - /team/rmudgett/bch_shift_v...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Mar 23 09:40:32 CDT 2011
Author: rmudgett
Date: Wed Mar 23 09:40:26 2011
New Revision: 311604
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311604
Log:
Block SETUPs with duplicate call ptr.
Modified:
team/rmudgett/bch_shift_v1.8/channels/sig_pri.c
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=311604&r1=311603&r2=311604
==============================================================================
--- team/rmudgett/bch_shift_v1.8/channels/sig_pri.c (original)
+++ team/rmudgett/bch_shift_v1.8/channels/sig_pri.c Wed Mar 23 09:40:26 2011
@@ -4893,6 +4893,15 @@
e->ring.call);
break;
}
+ chanpos = pri_find_principle_by_call(pri, e->ring.call);
+ if (-1 < chanpos) {
+ /* Libpri has already filtered out duplicate SETUPs. */
+ ast_log(LOG_WARNING,
+ "Span %d: Got SETUP with duplicate call ptr. Dropping call.\n",
+ pri->span);
+ pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_NORMAL_TEMPORARY_FAILURE);
+ break;
+ }
if (e->ring.channel == -1 || PRI_CHANNEL(e->ring.channel) == 0xFF) {
/* Any channel requested. */
chanpos = pri_find_empty_chan(pri, 1);
@@ -4925,14 +4934,6 @@
pri->span, PRI_SPAN(e->ring.channel),
PRI_CHANNEL(e->ring.channel));
} else if (!sig_pri_is_chan_available(pri->pvts[chanpos])) {
- /* Libpri has already filtered out duplicate SETUPs anyway. */
- if (pri->pvts[chanpos]->call == e->ring.call) {
- ast_log(LOG_WARNING,
- "Span %d: Ignoring duplicate SETUP on channel %d/%d\n",
- pri->span, PRI_SPAN(e->ring.channel),
- PRI_CHANNEL(e->ring.channel));
- break;
- }
/* This is where we handle initial glare */
ast_debug(1,
"Span %d: SETUP requested unavailable channel %d/%d. Attempting to renegotiate.\n",
More information about the svn-commits
mailing list