bts: Rename bts_ms_by_{tlli,imsi} -> bts_get_ms_by_{tlli,imsi}
While at it, put them together and mark bts param as const.
This is a preparation for next patch.
Change-Id: Iad8aec4424f1f23cd4d02a14c4f9ec1b9fdb1f75
diff --git a/src/bts.cpp b/src/bts.cpp
index 30450bc..e3a5eeb 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -724,7 +724,7 @@
}
/* Find related TBF and send confirmation signal to FSM */
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
if (!ms) {
LOGP(DTBFDL, LOGL_ERROR, "FN=%u Got IMM.ASS confirm for unknown MS with TLLI=%08x\n", fn, tlli);
return -EINVAL;
@@ -1212,11 +1212,16 @@
return bts->ms_store;
}
-struct GprsMs *bts_ms_by_tlli(struct gprs_rlcmac_bts *bts, uint32_t tlli, uint32_t old_tlli)
+struct GprsMs *bts_get_ms_by_tlli(const struct gprs_rlcmac_bts *bts, uint32_t tlli, uint32_t old_tlli)
{
return bts_ms_store(bts)->get_ms(tlli, old_tlli);
}
+struct GprsMs *bts_get_ms_by_imsi(const struct gprs_rlcmac_bts *bts, const char *imsi)
+{
+ return bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi);
+}
+
/* update TA based on TA provided by PH-DATA-IND */
void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta)
{
@@ -1422,11 +1427,6 @@
bts_set_max_mcs_ul(bts, mcs_ul);
}
-struct GprsMs *bts_ms_by_imsi(struct gprs_rlcmac_bts *bts, const char *imsi)
-{
- return bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi);
-}
-
const struct llist_head* bts_ms_list(struct gprs_rlcmac_bts *bts)
{
return bts_ms_store(bts)->ms_list();