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: 4ddc37ce71
Change-Id: Iba7873530aac74b3bf799819890641196dacf170
This commit is contained in:
Pau Espin 2021-09-23 22:14:01 +02:00
parent e12f911bbb
commit 72d81b978a
1 changed files with 2 additions and 0 deletions

View File

@ -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.