From 0ff8a087c616177f0162d4acab6bf7be2e60aa4a Mon Sep 17 00:00:00 2001 From: Moises Silva Date: Fri, 27 Jan 2012 06:44:11 -0500 Subject: [PATCH] freetdm: Fix incorrect state transition from DOWN to UP when processing an SS7 clone event --- .../src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c index 06ddd7e8d1..bcc21df7be 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c @@ -687,13 +687,13 @@ static void ftdm_sangoma_ss7_process_peer_stack_event (ftdm_channel_t *ftdmchan, { sngss7_chan_data_t *sngss7_info = ftdmchan->call_data; - if (ftdmchan->state < FTDM_CHANNEL_STATE_UP) { + if (ftdmchan->state < FTDM_CHANNEL_STATE_UP && ftdmchan->state != FTDM_CHANNEL_STATE_DOWN) { ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_UP); ftdm_channel_advance_states(ftdmchan); } - SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Receiving message %s from bridged peer\n", - sngss7_info->circuit->cic, ftdm_sngss7_event2str(sngss7_event->event_id)); + SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Receiving message %s from bridged peer (our state = %s)\n", + sngss7_info->circuit->cic, ftdm_sngss7_event2str(sngss7_event->event_id), ftdm_channel_state2str(ftdmchan->state)); switch (sngss7_event->event_id) {