cosmetic: Hide all accesses to conn->bts behind conn_get_bts()
This is a new inline function that hides all accesses to conn->bts.
A follow-up patch will then point this to conn->lchan->ts->trx->bts
to get rid of the bts field.
Change-Id: Ib6cf7097ced34eebe80441c29ab1534f21956a33
diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c
index 9ec51af..bd55dfc 100644
--- a/src/libbsc/bsc_api.c
+++ b/src/libbsc/bsc_api.c
@@ -214,7 +214,7 @@
chan_type = full_rate ? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H;
- new_lchan = lchan_alloc(conn->bts, chan_type, 0);
+ new_lchan = lchan_alloc(conn_get_bts(conn), chan_type, 0);
if (!new_lchan) {
LOGP(DMSC, LOGL_NOTICE, "No free channel.\n");
@@ -451,7 +451,7 @@
conn->lchan = conn->secondary_lchan;
conn->secondary_lchan = NULL;
- if (is_ipaccess_bts(conn->bts) && conn->lchan->tch_mode != GSM48_CMODE_SIGN)
+ if (is_ipaccess_bts(conn_get_bts(conn)) && conn->lchan->tch_mode != GSM48_CMODE_SIGN)
rsl_ipacc_crcx(conn->lchan);
api->assign_compl(conn, gh->data[0],