[PATCH (for jolly/testing)] Fixed seg fault when using sysmobts and added sysmo enum to tch_frame_down

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Alex Duller alexd at afterthoughtsoftware.com
Fri Apr 26 19:46:00 UTC 2013


---
 openbsc/src/libbsc/bts_ipaccess_nanobts.c |    6 +++---
 openbsc/src/libbsc/bts_sysmobts.c         |    4 ++++
 openbsc/src/libmsc/gsm_04_08.c            |    1 +
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/openbsc/src/libbsc/bts_ipaccess_nanobts.c b/openbsc/src/libbsc/bts_ipaccess_nanobts.c
index 16f6a6b..c20d240 100644
--- a/openbsc/src/libbsc/bts_ipaccess_nanobts.c
+++ b/openbsc/src/libbsc/bts_ipaccess_nanobts.c
@@ -280,7 +280,7 @@ static int nm_statechg_event(int evt, struct nm_statechg_signal_data *nsd)
 	struct gsm_bts_trx_ts *ts;
 	struct gsm_bts_gprs_nsvc *nsvc;
 
-	if (nsd->bts->type != GSM_BTS_TYPE_NANOBTS)
+	if (!is_ipaccess_bts(nsd->bts))
 		return 0;
 
 	/* This event-driven BTS setup is currently only required on nanoBTS */
@@ -400,7 +400,7 @@ static int sw_activ_rep(struct msgb *mb)
 	if (!trx)
 		return -EINVAL;
 
-	if (trx->bts->type != GSM_BTS_TYPE_NANOBTS)
+	if (!is_ipaccess_bts(trx->bts))
 		return 0;
 
 	switch (foh->obj_class) {
@@ -460,7 +460,7 @@ int bts_ipa_nm_sig_cb(unsigned int subsys, unsigned int signal,
 	return 0;
 }
 
-static struct gsm_network *ipaccess_gsmnet;
+struct gsm_network *ipaccess_gsmnet;
 
 static int bts_model_nanobts_start(struct gsm_network *net)
 {
diff --git a/openbsc/src/libbsc/bts_sysmobts.c b/openbsc/src/libbsc/bts_sysmobts.c
index 9479206..0f0b6eb 100644
--- a/openbsc/src/libbsc/bts_sysmobts.c
+++ b/openbsc/src/libbsc/bts_sysmobts.c
@@ -45,6 +45,8 @@ extern struct gsm_bts_model bts_model_nanobts;
 
 static struct gsm_bts_model model_sysmobts;
 
+extern struct gsm_network *ipaccess_gsmnet;
+
 static int bts_model_sysmobts_start(struct gsm_network *net)
 {
 	model_sysmobts.features.data = &model_sysmobts._features_data[0];
@@ -56,6 +58,8 @@ static int bts_model_sysmobts_start(struct gsm_network *net)
 
 	osmo_signal_register_handler(SS_NM, bts_ipa_nm_sig_cb, NULL);
 
+	ipaccess_gsmnet = net;
+
 	return 0;
 }
 
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index e560653..30be610 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -1774,6 +1774,7 @@ int tch_frame_down(struct gsm_network *net, uint32_t callref, struct gsm_data_fr
 	}
 	bts = trans->conn->lchan->ts->trx->bts;
 	switch (bts->type) {
+	case GSM_BTS_TYPE_OSMO_SYSMO:
 	case GSM_BTS_TYPE_NANOBTS:
 		if (!trans->conn->lchan->abis_ip.rtp_socket) {
 			DEBUGP(DMNCC, "TCH frame to lchan without RTP connection\n");
-- 
1.7.9.5





More information about the OpenBSC mailing list