This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgremove obsolete gsm_subscriber_connection.bts member This member was merely a cache for conn->lchan->ts->trx->bts, so let's avoid having to keep copies of the same data (which needs to be kept up to date). Change-Id: Id3bff8b18425ef5d45eb460ac9eb620023013ba0 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_api.c M src/libbsc/handover_logic.c 3 files changed, 5 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/11/5511/2 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 45fbcd2..05260c6 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -85,9 +85,6 @@ struct gsm_lchan *lchan; /* the future/allocated but not yet used lchan during HANDOVER */ struct gsm_lchan *ho_lchan; - /* a short-hand pointer to the BTS currently serving the subscriber, - * points to gsm_subscriber_connection.lchan->ts->trx->bts */ - struct gsm_bts *bts; /* timer for assignment handling */ struct osmo_timer_list T10; @@ -98,13 +95,14 @@ struct gsm_classmark classmark; }; -static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection *conn) { - return conn->bts; -} - #include "gsm_data_shared.h" +static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection *conn) { + OSMO_ASSERT(conn->lchan); + return conn->lchan->ts->trx->bts; +} + enum { BTS_CTR_CHREQ_TOTAL, BTS_CTR_CHREQ_NO_CHANNEL, diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index bd55dfc..e015a02 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -260,7 +260,6 @@ conn->network = net; conn->lchan = lchan; - conn->bts = lchan->ts->trx->bts; lchan->conn = conn; llist_add_tail(&conn->entry, &net->subscr_conns); return conn; @@ -747,7 +746,6 @@ conn->lchan = NULL; conn->secondary_lchan = NULL; conn->ho_lchan = NULL; - conn->bts = NULL; osmo_timer_del(&conn->T10); diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c index a30cd09..5ad1392 100644 --- a/src/libbsc/handover_logic.c +++ b/src/libbsc/handover_logic.c @@ -277,7 +277,6 @@ new_lchan->conn->ho_lchan = NULL; new_lchan->conn->lchan = new_lchan; - new_lchan->conn->bts = new_lchan->ts->trx->bts; ho->old_lchan->conn = NULL; lchan_release(ho->old_lchan, 0, RSL_REL_LOCAL_END); -- To view, visit https://gerrit.osmocom.org/5511 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id3bff8b18425ef5d45eb460ac9eb620023013ba0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder