freetdm: On alarm off event make sure that we had alarm on before issuing HW UNBLOCK
This commit is contained in:
parent
d0188836f8
commit
44895d738d
|
@ -366,12 +366,14 @@ static void *ftdm_sangoma_ss7_run(ftdm_thread_t * me, void *obj)
|
||||||
if (ftdmchan->alarm_flags != 0) { /* we'll send out block */
|
if (ftdmchan->alarm_flags != 0) { /* we'll send out block */
|
||||||
sngss7_set_ckt_blk_flag(ss7_info, FLAG_GRP_HW_BLOCK_TX );
|
sngss7_set_ckt_blk_flag(ss7_info, FLAG_GRP_HW_BLOCK_TX );
|
||||||
} else { /* we'll send out reset */
|
} else { /* we'll send out reset */
|
||||||
|
if (sngss7_test_ckt_blk_flag(ss7_info, FLAG_GRP_HW_BLOCK_TX )) {
|
||||||
sngss7_clear_ckt_blk_flag( ss7_info, FLAG_GRP_HW_BLOCK_TX );
|
sngss7_clear_ckt_blk_flag( ss7_info, FLAG_GRP_HW_BLOCK_TX );
|
||||||
sngss7_clear_ckt_blk_flag( ss7_info, FLAG_GRP_HW_BLOCK_TX_DN );
|
sngss7_clear_ckt_blk_flag( ss7_info, FLAG_GRP_HW_BLOCK_TX_DN );
|
||||||
sngss7_set_ckt_blk_flag (ss7_info, FLAG_GRP_HW_UNBLK_TX);
|
sngss7_set_ckt_blk_flag (ss7_info, FLAG_GRP_HW_UNBLK_TX);
|
||||||
SS7_DEBUG("b_alarm_test FLAG_GRP_HW_UNBLK_TX\n");
|
SS7_DEBUG("b_alarm_test FLAG_GRP_HW_UNBLK_TX\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
usleep(50);
|
usleep(50);
|
||||||
}
|
}
|
||||||
ftdmchan = NULL;
|
ftdmchan = NULL;
|
||||||
|
|
Loading…
Reference in New Issue