From 946ec62893014a5796d0d90b1fc62797d4102164 Mon Sep 17 00:00:00 2001 From: Konrad Hammel Date: Mon, 7 Feb 2011 10:49:26 -0500 Subject: [PATCH] freemtdm: ss7 - SPC no long in sng_gen...new configuration file --- .../src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cfg.c | 7 +++---- .../src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c | 4 +++- .../src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c | 5 ----- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cfg.c b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cfg.c index 01d101300e..20bcc3a043 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cfg.c +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cfg.c @@ -99,6 +99,7 @@ int ft_to_sngss7_cfg_all(void) return 1; } else { SS7_INFO("Started Stack Manager!\n"); + sngss7_set_flag(&g_ftdm_sngss7_data.cfg, SNGSS7_SM); } /* check if the configuration had a Relay Channel */ @@ -575,12 +576,10 @@ int ftmod_ss7_mtp3_gen_config(void) cfg.t.cfg.s.snGen.typeSP = LSN_TYPE_SP; /* type of signalling postatic int */ - cfg.t.cfg.s.snGen.spCode1 = g_ftdm_sngss7_data.cfg.spc; /* our DPC for CCITT version */ - + cfg.t.cfg.s.snGen.spCode1 = 0; /* our DPC for CCITT version */ #if (SS7_ANS92 || SS7_ANS88 || SS7_ANS96 || SS7_CHINA || defined(TDS_ROLL_UPGRADE_SUPPORT)) - cfg.t.cfg.s.snGen.spCode2 = g_ftdm_sngss7_data.cfg.spc; /* our DPC for ANSI or CHINA version */ + cfg.t.cfg.s.snGen.spCode2 = 0; /* our DPC for ANSI or CHINA version */ #endif - cfg.t.cfg.s.snGen.ssfValid = TRUE; /* ssf validation required */ cfg.t.cfg.s.snGen.nmbDLSap = MAX_SN_LINKS; /* number of MTP Data Link SAPs */ cfg.t.cfg.s.snGen.nmbNSap = MAX_SN_ROUTES; /* number of Upper Layer Saps */ 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 ad528272c4..2f2e502314 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 @@ -1598,7 +1598,9 @@ static FIO_SIG_UNLOAD_FUNCTION(ftdm_sangoma_ss7_unload) sngss7_clear_flag(&g_ftdm_sngss7_data.cfg, SNGSS7_RY); } - sng_isup_free_sm(); + if (sngss7_test_flag(&g_ftdm_sngss7_data.cfg, SNGSS7_SM)) { + sng_isup_free_sm(); + } sng_isup_free_gen(); diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c index dc6428d0bb..46df9908e9 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c @@ -464,11 +464,6 @@ static int ftmod_ss7_parse_sng_gen(ftdm_conf_node_t *sng_gen) SS7_DEBUG("Found license file = %s\n", g_ftdm_sngss7_data.cfg.license); SS7_DEBUG("Found signature file = %s\n", g_ftdm_sngss7_data.cfg.signature); /**********************************************************************/ - } else if (!strcasecmp(parm->var, "spc")) { - /**********************************************************************/ - g_ftdm_sngss7_data.cfg.spc = atoi(parm->val); - SS7_DEBUG("Found SPC = %d\n", g_ftdm_sngss7_data.cfg.spc); - /**********************************************************************/ } else { /**********************************************************************/ SS7_ERROR("Found an invalid parameter \"%s\"!\n", parm->val);