diff options
author | Ivan Klyuchnikov <kluchnikovi@gmail.com> | 2017-01-26 14:42:18 +0000 |
---|---|---|
committer | Ivan Kluchnikov <kluchnikovi@gmail.com> | 2017-02-10 13:37:50 +0000 |
commit | 0418ef588cddd9ae06e7505890ed028b17f9abce (patch) | |
tree | bcc7a836f7fda3116ce086c2fc08188df566bdf1 /src/osmo-bts-trx/main.c | |
parent | e2e0ed5a8962cd465fd5394815af20a46a1d23d2 (diff) |
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 to start-up procedure of osmo-bts.
Change-Id: I6e23f92644400acb268818c9373a8fb10c003da1
Diffstat (limited to 'src/osmo-bts-trx/main.c')
-rw-r--r-- | src/osmo-bts-trx/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c index dbd8fc4d..98066cab 100644 --- a/src/osmo-bts-trx/main.c +++ b/src/osmo-bts-trx/main.c @@ -121,6 +121,10 @@ void bts_model_phy_link_set_defaults(struct phy_link *plink) 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) |