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/.
Ivan Kluchnikov gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/1786
osmo-trx-bts: Fix osmo-bts-trx crash on startup during reading phy instance parameters from config file
pinst->u.osmotrx.hdl should be allocated before reading phy_instance parameters from config file and applying them.
So allocation of pinst->u.osmotrx.hdl should be moved from l1if_open function to bts_model_phy_instance_set_defaults function,
which is proper place for this allocation according start-up procedure of osmo-bts.
Change-Id: I6e23f92644400acb268818c9373a8fb10c003da1
---
M src/osmo-bts-trx/l1_if.c
M src/osmo-bts-trx/main.c
2 files changed, 5 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/86/1786/1
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index 8c5115b..6c1969c 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -66,10 +66,9 @@
struct trx_l1h *l1h;
int rc;
- l1h = talloc_zero(tall_bts_ctx, struct trx_l1h);
+ l1h = pinst->u.osmotrx.hdl;
if (!l1h)
return NULL;
- l1h->phy_inst = pinst;
rc = trx_sched_init(&l1h->l1s, pinst->trx);
if (rc < 0) {
diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c
index dbd8fc4..98066ca 100644
--- a/src/osmo-bts-trx/main.c
+++ b/src/osmo-bts-trx/main.c
@@ -121,6 +121,10 @@
void bts_model_phy_instance_set_defaults(struct phy_instance *pinst)
{
+ struct trx_l1h *l1h;
+ l1h = talloc_zero(tall_bts_ctx, struct trx_l1h);
+ l1h->phy_inst = pinst;
+ pinst->u.osmotrx.hdl = l1h;
}
int main(int argc, char **argv)
--
To view, visit https://gerrit.osmocom.org/1786
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e23f92644400acb268818c9373a8fb10c003da1
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Ivan Kluchnikov <kluchnikovi at gmail.com>