From 148ee361b35cd942327049f7abf37aaad818fb70 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 18 Dec 2017 18:44:25 +0100 Subject: 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 --- src/libbsc/bsc_api.c | 4 ++-- src/libbsc/bsc_vty.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libbsc') diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 9ec51af03..bd55dfc5c 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -214,7 +214,7 @@ static int handle_new_assignment(struct gsm_subscriber_connection *conn, int cha 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 @@ static void handle_ass_compl(struct gsm_subscriber_connection *conn, 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], diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 7612edaac..6d0110996 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -1378,7 +1378,7 @@ DEFUN(handover_subscr_conn, /* Find the connection/lchan that we want to handover */ llist_for_each_entry(conn, &net->subscr_conns, entry) { - if (conn->bts->nr == bts_nr && + if (conn_get_bts(conn)->nr == bts_nr && conn->lchan->ts->trx->nr == trx_nr && conn->lchan->ts->nr == ts_nr && conn->lchan->nr == ss_nr) { vty_out(vty, "starting handover for lchan %s...%s", -- cgit v1.2.3