From ed494443cc1e9732b43ef99cccf187d17ac931ef Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 21 Apr 2016 18:55:09 +0200 Subject: Ensure TRX invariant 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(+) (limited to 'include') diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h index a559aa3e..edc6cc09 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; } -- cgit v1.2.3