From: Max <msuraev(a)sysmocom.de>
There is implicit invariant in trx_phy_instance() which is actively used
by various hw-specific implementations to get TRX's phy instance. Let's
make sure there's explicit assertion for this because there's been
segfaults in the past related to it.
---
include/osmo-bts/phy_link.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h
index a559aa3..edc6cc0 100644
--- a/include/osmo-bts/phy_link.h
+++ b/include/osmo-bts/phy_link.h
@@ -125,6 +125,7 @@ void phy_user_statechg_notif(struct phy_instance *pinst, enum
phy_link_state lin
static inline struct phy_instance *trx_phy_instance(struct gsm_bts_trx *trx)
{
+ OSMO_ASSERT(trx);
return trx->role_bts.l1h;
}
--
2.8.1