freetdm: Fix bug in SS7 state processing introduced during the changes

for native bridging that caused infinite SUSPEND state executions
         due to peer member not being cleared at the end of the call
This commit is contained in:
Moises Silva 2012-01-31 15:18:53 -05:00 committed by James Zhang
parent c9c68a7759
commit cca407d09a
1 changed files with 5 additions and 5 deletions

View File

@ -1049,14 +1049,14 @@ ftdm_status_t ftdm_sangoma_ss7_process_state_change (ftdm_channel_t *ftdmchan)
sngss7_info->ckt_flags,
sngss7_info->blk_flags);
if (ftdmchan->state == FTDM_CHANNEL_STATE_DIALING) {
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_NATIVE_SIGBRIDGE)) {
/* DIALING is the only state we process normally when doing an outgoing call that is natively bridged */
if (ftdmchan->state != FTDM_CHANNEL_STATE_DIALING) {
return ftdm_sangoma_ss7_native_bridge_state_change(ftdmchan);
}
sngss7_info->peer_data = NULL;
}
if (sngss7_info->peer_data) {
return ftdm_sangoma_ss7_native_bridge_state_change(ftdmchan);
}
/*check what state we are supposed to be in */
switch (ftdmchan->state) {
/**************************************************************************/