wbokslag has uploaded this change for review.

View Change

Small bugfix in SYSINFO parsing

Small bugfix. We now increases the position in the SYSINFO read
buffer when parsing hyperframe or cck number.

Change-Id: Ic35f5106c096a7a3dd0d2302ad53fa00c69ab76d
---
M src/tetra_mac_pdu.c
1 file changed, 5 insertions(+), 4 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-tetra refs/changes/80/41680/1
diff --git a/src/tetra_mac_pdu.c b/src/tetra_mac_pdu.c
index 06c93ef..b81edcb 100644
--- a/src/tetra_mac_pdu.c
+++ b/src/tetra_mac_pdu.c
@@ -57,10 +57,11 @@
sid->access_parameter = bits_to_uint(cur, 4); cur += 4;
sid->radio_dl_timeout = bits_to_uint(cur, 4); cur += 4;
sid->cck_valid_no_hf = *cur++;
- if (sid->cck_valid_no_hf)
- sid->cck_id = bits_to_uint(cur, 16);
- else
- sid->hyperframe_number = bits_to_uint(cur, 16);
+ if (sid->cck_valid_no_hf) {
+ sid->cck_id = bits_to_uint(cur, 16); cur += 16;
+ } else {
+ sid->hyperframe_number = bits_to_uint(cur, 16); cur += 16;
+ }
sid->option_field = bits_to_uint(cur, 2); cur += 2;

switch (sid->option_field) {

To view, visit change 41680. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Change-Id: Ic35f5106c096a7a3dd0d2302ad53fa00c69ab76d
Gerrit-Change-Number: 41680
Gerrit-PatchSet: 1
Gerrit-Owner: wbokslag <w.bokslag@midnightblue.nl>