From 72d81b978a0d0429f07c1bb67feb54973ad6fe13 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 23 Sep 2021 22:14:01 +0200 Subject: [PATCH] osmo-bts-omldummy: Fix crash accessing null phy osmo-bts-omldummy is known to be specially in the sense that it has no phy. This should ideally be changed to have some dummy object, but so far that's how it is. A recent commit checking the phy's forgot about the fact that BTS model has no phy. Let's fix it. Fixes: 4ddc37ce7140e5ce6ca6cce5aeeefedc0d395d22 Change-Id: Iba7873530aac74b3bf799819890641196dacf170 --- src/common/nm_bts_fsm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/nm_bts_fsm.c b/src/common/nm_bts_fsm.c index bad533f65..0ad7655de 100644 --- a/src/common/nm_bts_fsm.c +++ b/src/common/nm_bts_fsm.c @@ -72,6 +72,8 @@ static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event oml_mo_tx_sw_act_rep(&bts->mo); llist_for_each_entry(trx, &bts->trx_list, list) { + if (trx->bts->variant == BTS_OSMO_OMLDUMMY) /* In OMLDUMMY, phy=NULL */ + continue; /* During startup, phy_links are already opened, but if we are * re-connecting, phy_link was closed when disconnected from * previous BSC, so let's re-open it.