Change in osmo-bsc[master]: Move acc_ramp_init inside gsm_bts_alloc

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/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Thu Jul 16 13:27:46 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/19300 )


Change subject: Move acc_ramp_init inside gsm_bts_alloc
......................................................................

Move acc_ramp_init inside gsm_bts_alloc

The function initializes the struct owned by a bts, so it makes sense to
have it done there instead of somewhere else later.

It was most probably put in bsc_vty when it was initially introduced
because of all the data structure and object file mess I untangled
during last set of patches.

Change-Id: I66c4b208583e92070793183b83b3a7b7edf6ba00
---
M src/ipaccess/Makefile.am
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/bts.c
M src/utils/Makefile.am
M tests/abis/Makefile.am
M tests/bsc/Makefile.am
M tests/gsm0408/Makefile.am
M tests/nanobts_omlattr/Makefile.am
8 files changed, 10 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/00/19300/1

diff --git a/src/ipaccess/Makefile.am b/src/ipaccess/Makefile.am
index a1812a9..a11b295 100644
--- a/src/ipaccess/Makefile.am
+++ b/src/ipaccess/Makefile.am
@@ -49,6 +49,7 @@
 	$(top_builddir)/src/osmo-bsc/bts.o \
 	$(top_builddir)/src/osmo-bsc/bts_trx.o \
 	$(top_builddir)/src/osmo-bsc/abis_nm.o \
+	$(top_builddir)/src/osmo-bsc/acc_ramp.o \
 	$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts.o \
 	$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
 	$(top_builddir)/src/osmo-bsc/gsm_data.o \
@@ -63,6 +64,7 @@
 
 ipaccess_proxy_LDADD = \
 	$(top_builddir)/src/osmo-bsc/abis_nm.o \
+	$(top_builddir)/src/osmo-bsc/acc_ramp.o \
 	$(top_builddir)/src/osmo-bsc/bts.o \
 	$(top_builddir)/src/osmo-bsc/bts_trx.o \
 	$(top_builddir)/src/osmo-bsc/gsm_data.o \
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index aa08e8b..11e51be 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -2153,11 +2153,6 @@
 		bts = bsc_bts_alloc_register(gsmnet, GSM_BTS_TYPE_UNKNOWN,
 					     HARDCODED_BSIC);
 		osmo_stat_item_inc(gsmnet->bsc_statg->items[BSC_STAT_NUM_BTS_TOTAL], 1);
-		/*
-		 * Initialize bts->acc_ramp here. Else we could segfault while
-		 * processing a configuration file with ACC ramping settings.
-		 */
-		acc_ramp_init(&bts->acc_ramp, bts);
 	} else
 		bts = gsm_bts_num(gsmnet, bts_nr);
 
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 055cc47..7794024 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -387,6 +387,8 @@
 	bts_init_cbch_state(&bts->cbch_basic, bts);
 	bts_init_cbch_state(&bts->cbch_extended, bts);
 
+	acc_ramp_init(&bts->acc_ramp, bts);
+
 	return bts;
 }
 
diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am
index 653ed97..683c227 100644
--- a/src/utils/Makefile.am
+++ b/src/utils/Makefile.am
@@ -48,6 +48,7 @@
 
 bs11_config_LDADD = \
 	$(top_builddir)/src/osmo-bsc/abis_nm.o \
+	$(top_builddir)/src/osmo-bsc/acc_ramp.o \
 	$(top_builddir)/src/osmo-bsc/bts.o \
 	$(top_builddir)/src/osmo-bsc/bts_trx.o \
 	$(top_builddir)/src/osmo-bsc/bts_siemens_bs11.o \
@@ -120,6 +121,7 @@
 
 meas_json_LDADD = \
 	$(top_builddir)/src/osmo-bsc/abis_nm.o \
+	$(top_builddir)/src/osmo-bsc/acc_ramp.o \
 	$(top_builddir)/src/osmo-bsc/bts.o \
 	$(top_builddir)/src/osmo-bsc/bts_trx.o \
 	$(top_builddir)/src/osmo-bsc/gsm_data.o \
diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am
index 5f81ceb..031d689 100644
--- a/tests/abis/Makefile.am
+++ b/tests/abis/Makefile.am
@@ -26,6 +26,7 @@
 
 abis_test_LDADD = \
 	$(top_builddir)/src/osmo-bsc/abis_nm.o \
+	$(top_builddir)/src/osmo-bsc/acc_ramp.o \
 	$(top_builddir)/src/osmo-bsc/bts.o \
 	$(top_builddir)/src/osmo-bsc/bts_trx.o \
 	$(top_builddir)/src/osmo-bsc/gsm_data.o \
diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am
index 012bd79..282f603 100644
--- a/tests/bsc/Makefile.am
+++ b/tests/bsc/Makefile.am
@@ -34,6 +34,7 @@
 
 bsc_test_LDADD = \
 	$(top_builddir)/src/osmo-bsc/abis_nm.o \
+	$(top_builddir)/src/osmo-bsc/acc_ramp.o \
 	$(top_builddir)/src/osmo-bsc/arfcn_range_encode.o \
 	$(top_builddir)/src/osmo-bsc/osmo_bsc_filter.o \
 	$(top_builddir)/src/osmo-bsc/bsc_subscriber.o \
diff --git a/tests/gsm0408/Makefile.am b/tests/gsm0408/Makefile.am
index 790f3aa..4e22392 100644
--- a/tests/gsm0408/Makefile.am
+++ b/tests/gsm0408/Makefile.am
@@ -24,6 +24,7 @@
 
 gsm0408_test_LDADD = \
 	$(top_builddir)/src/osmo-bsc/abis_nm.o \
+	$(top_builddir)/src/osmo-bsc/acc_ramp.o \
 	$(top_builddir)/src/osmo-bsc/gsm_04_08_rr.o \
 	$(top_builddir)/src/osmo-bsc/arfcn_range_encode.o \
 	$(top_builddir)/src/osmo-bsc/bts.o \
diff --git a/tests/nanobts_omlattr/Makefile.am b/tests/nanobts_omlattr/Makefile.am
index 5a627ff..67d059f 100644
--- a/tests/nanobts_omlattr/Makefile.am
+++ b/tests/nanobts_omlattr/Makefile.am
@@ -24,6 +24,7 @@
 
 nanobts_omlattr_test_LDADD = \
 	$(top_builddir)/src/osmo-bsc/abis_nm.o \
+	$(top_builddir)/src/osmo-bsc/acc_ramp.o \
 	$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
 	$(top_builddir)/src/osmo-bsc/bts.o \
 	$(top_builddir)/src/osmo-bsc/bts_trx.o \

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/19300
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I66c4b208583e92070793183b83b3a7b7edf6ba00
Gerrit-Change-Number: 19300
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200716/42f8fbda/attachment.htm>


More information about the gerrit-log mailing list