diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-03-13 17:49:54 +0300 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-03-14 19:06:21 +0300 |
commit | 36aaf3574abae87aecbbda018d9189b056a62148 (patch) | |
tree | 0adabca6c185f04a4e2937623168bbae6b7bb471 | |
parent | fd60c40d600c560d007b08e2671941e3ca5214b6 (diff) |
gsm48_make_ho_cmd(): make 'struct gsm_lchan' pointer const
Related: SYS#5838
Change-Id: I731179bf7f5d711ca114e36af661faccf0caa19f
(cherry picked from commit 798a71eb300dfeb4c76e8c3d2973173ae81e1602)
-rw-r--r-- | include/osmocom/bsc/gsm_04_08_rr.h | 3 | ||||
-rw-r--r-- | src/osmo-bsc/gsm_04_08_rr.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/include/osmocom/bsc/gsm_04_08_rr.h b/include/osmocom/bsc/gsm_04_08_rr.h index d4617ae69..613787db4 100644 --- a/include/osmocom/bsc/gsm_04_08_rr.h +++ b/include/osmocom/bsc/gsm_04_08_rr.h @@ -24,7 +24,8 @@ int gsm48_send_rr_ciph_mode(struct gsm_lchan *lchan, int want_imeisv); int gsm48_multirate_config(struct msgb *msg, const struct gsm48_multi_rate_conf *mr_conf, const struct amr_mode *modes, unsigned int num_modes); -struct msgb *gsm48_make_ho_cmd(struct gsm_lchan *new_lchan, uint8_t power_command, uint8_t ho_ref); +struct msgb *gsm48_make_ho_cmd(const struct gsm_lchan *new_lchan, + uint8_t power_command, uint8_t ho_ref); int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, uint8_t power_command); int gsm48_send_rr_app_info(struct gsm_lchan *lchan, uint8_t apdu_id, uint8_t apdu_flags, const uint8_t *apdu_data, ssize_t apdu_data_len); diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c index 472e81f9e..673a1a4b3 100644 --- a/src/osmo-bsc/gsm_04_08_rr.c +++ b/src/osmo-bsc/gsm_04_08_rr.c @@ -533,13 +533,14 @@ return_msg: #define GSM48_HOCMD_CCHDESC_LEN 16 /* Chapter 9.1.15: Handover Command */ -struct msgb *gsm48_make_ho_cmd(struct gsm_lchan *new_lchan, uint8_t power_command, uint8_t ho_ref) +struct msgb *gsm48_make_ho_cmd(const struct gsm_lchan *new_lchan, + uint8_t power_command, uint8_t ho_ref) { struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 HO CMD"); struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); struct gsm48_ho_cmd *ho = (struct gsm48_ho_cmd *) msgb_put(msg, sizeof(*ho)); - struct gsm_bts *bts = new_lchan->ts->trx->bts; + const struct gsm_bts *bts = new_lchan->ts->trx->bts; gh->proto_discr = GSM48_PDISC_RR; gh->msg_type = GSM48_MT_RR_HANDO_CMD; |