[svn-commits] mattf: branch mattf/asterisk-ss7 r40844 -
/team/mattf/asterisk-ss7/channels/
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Tue Aug 22 11:22:38 MST 2006
Author: mattf
Date: Tue Aug 22 13:22:38 2006
New Revision: 40844
URL: http://svn.digium.com/view/asterisk?rev=40844&view=rev
Log:
Add support for group blocking/unblocking of circuits
Modified:
team/mattf/asterisk-ss7/channels/chan_zap.c
Modified: team/mattf/asterisk-ss7/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/channels/chan_zap.c?rev=40844&r1=40843&r2=40844&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/channels/chan_zap.c (original)
+++ team/mattf/asterisk-ss7/channels/chan_zap.c Tue Aug 22 13:22:38 2006
@@ -8019,6 +8019,16 @@
return winner;
}
+static void ss7_block_cics(struct zt_ss7 *linskset, int startcic, int endcic, int block);
+{
+ int i;
+
+ for (i = 0; i < linkset->numchans; i++) {
+ if (linkset->pvts[i] && ((linkset->pvts[i]->cic >= startcic) && (linkset->pvts[i] <= endcic))) {
+ linkset->pvts[i]->blocked = block;
+ }
+}
+
static int ss7_reset_linkset(struct zt_ss7 *linkset)
{
int i, startcic = -1, endcic;
@@ -8297,6 +8307,12 @@
ast_mutex_unlock(&p->lock);
}
break;
+ case ISUP_EVENT_CGB:
+ ss7_block_cics(linkset, e->cgb.startcic, e->cgb.endcic, 1);
+ break;
+ case ISUP_EVENT_CGU:
+ ss7_block_cics(linkset, e->cgu.startcic, e->cgu.endcic, 0);
+ break;
case ISUP_EVENT_BLO:
chanpos = ss7_find_cic(linkset, e->blo.cic);
if (chanpos < 0) {
@@ -8305,9 +8321,7 @@
}
p = linkset->pvts[chanpos];
ast_log(LOG_DEBUG, "Blocking CIC %d\n", e->blo.cic);
- ast_mutex_lock(&p->lock);
p->blocked = 1;
- ast_mutex_unlock(&p->lock);
isup_bla(linkset->ss7, e->blo.cic);
break;
case ISUP_EVENT_UBL:
@@ -8318,11 +8332,10 @@
}
p = linkset->pvts[chanpos];
ast_log(LOG_DEBUG, "Unblocking CIC %d\n", e->ubl.cic);
- ast_mutex_lock(&p->lock);
p->blocked = 0;
- ast_mutex_unlock(&p->lock);
isup_uba(linkset->ss7, e->ubl.cic);
break;
+ case ISUP_EVENT_GBL
case ISUP_EVENT_CON:
case ISUP_EVENT_ANM:
if (e->e == ISUP_EVENT_CON)
More information about the svn-commits
mailing list