From: Konrad Hammel Date: Thu, 17 Mar 2011 19:17:46 +0000 (-0400) Subject: freetdm: ss7 - bug fix for crash on startup X-Git-Tag: v1.2-rc1~174 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4d2a6514399af6e5bd605cd6ff9c991a0c9a749d;p=thirdparty%2Ffreeswitch.git freetdm: ss7 - bug fix for crash on startup --- diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_in.c b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_in.c index adcdb3bca6..36a0f88d5a 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_in.c +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_in.c @@ -466,6 +466,14 @@ void sngss7_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint uint32_t intfId; int x; + /* confirm that the circuit is active on our side otherwise move to the next circuit */ + if (!sngss7_test_flag(&g_ftdm_sngss7_data.cfg.isupCkt[circuit], SNGSS7_ACTIVE)) { + SS7_ERROR("[CIC:%d]Rx %s but circuit is not active yet, skipping!\n", + g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic, + DECODE_LCC_EVENT(evntType)); + return; + } + /* check if the eventType is a pause/resume */ switch (evntType) { /**************************************************************************/