]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
freetdm: ss7 - bug fix for start up if sig link is on time slot 1
authorKonrad Hammel <konrad@sangoma.com>
Tue, 22 Mar 2011 15:44:05 +0000 (11:44 -0400)
committerKonrad Hammel <konrad@sangoma.com>
Fri, 25 Mar 2011 14:37:53 +0000 (10:37 -0400)
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_in.c

index 36a0f88d5ae3b7bea25bd41b5fd3eb055fac6cfc..d3828fe0e3b5db3828300251619eaba538dd8535 100644 (file)
@@ -466,13 +466,7 @@ 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) {
@@ -503,6 +497,14 @@ void sngss7_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
                        if (g_ftdm_sngss7_data.cfg.isupCkt[x].infId == intfId) {
                                /* we have a match, setup the pointers to the correct values */
                                circuit = 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_DEBUG("[CIC:%d]Rx %s but circuit is not active yet, skipping!\n",
+                                                       g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
+                                                       DECODE_LCC_EVENT(evntType));
+                               continue;
+                       }
                                
                                if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
                                        SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);