From 9563039a2a8cba0da1f0a7caf537dd78a56ffbe4 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 12 Apr 2017 14:29:13 +0200 Subject: Prepare for extended SI2quater support SI2quater support as per 3GPP TS 44.018 will require chnages to the way System Information is stored because it uses 1:n instead of 1:1 mapping between SI type and generated SI content. This should not affect other SI types though. To facilitate this transition: * convert the code to always use GSM_LCHAN_SI helper instead of accessing buffer directly * move duplicated code to inline function * add logging for buffer truncation and corresponding length values Requires I74e4e3cb86364cec869a1472a41b4a95af0d50dd in OpenBSC. Change-Id: Ie97be6ead6ce6d2d425fbfac8429bb90afb95acc Related: RT#8792 --- src/common/sysinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/sysinfo.c') diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index 177ed587..d8671c80 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -154,7 +154,7 @@ uint8_t *lchan_sacch_get(struct gsm_lchan *lchan) if (!(lchan->si.valid & (1 << tmp))) continue; lchan->si.last = tmp; - return lchan->si.buf[tmp]; + return GSM_LCHAN_SI(lchan, tmp); } return NULL; } -- cgit v1.2.3