path: root/include/osmocom
diff options
authorNeels Hofmeyr <neels@hofmeyr.de>2019-01-30 16:46:58 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2019-02-06 01:30:44 +0100
commit4daa21076f823b2f1aa07581befa5ed77d95aead (patch)
treebbddeeb31a0f61fc633d2137d1b8a45428b0e872 /include/osmocom
parent963763dfec6843adef2bd61425192c39d14e3ba0 (diff)
handover_fsm: do not access conn->assignment.req, it may be outdated
handover_fsm.c accesses conn->assignment.req.s15_s0 to find out the current lchan's AMR configuration. However, conn->assignment.* values are only valid during an ongoing assignment. Those values may be overwritten by any failed Assignment attempt, at any time, and hence do not reflect the currently assigned conn->lchan. Those realms must be kept separate. The assignment.req.s15_s0 get passed to lchan_activate(), so it makes most sense to store these values in struct gsm_lchan once the lchan activation succeeded. Add gsm_lchan.s15_s0, store the s15_s0 received in lchan_activate_info during lchan_activate(). In handover_fsm.c, use conn->lchan->s15_s0 instead of conn->assignment.*. Change-Id: Id8018fd9d56421f2ab7be91703018f6d6f21c929
Diffstat (limited to 'include/osmocom')
1 files changed, 2 insertions, 0 deletions
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index a5fe1f1bd..867a46c9a 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -578,6 +578,8 @@ struct gsm_lchan {
/* AMR bits */
uint8_t mr_ms_lv[7];
uint8_t mr_bts_lv[7];
+ /* AMR bits were based on these rate bits: */
+ uint16_t s15_s0;
/* Established data link layer services */
uint8_t sapis[8];