From 7505f1d63613892a29c3bfb503d3f6f185fb1016 Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Mon, 1 Feb 2016 15:05:42 +0100 Subject: encoding: Use explicit LH encoding in write_immediate_assignment Currently bitvec_write_field is used which just sets the bits as given, while the spec 44.018 assumes LH encoding. Use the bitvec_write_field_lh function instead. Sponsored-by: On-Waves ehf --- src/encoding.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/encoding.cpp b/src/encoding.cpp index 9471fff..4da533a 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -83,7 +83,7 @@ int Encoding::write_immediate_assignment( if (downlink) { // GSM 04.08 10.5.2.16 IA Rest Octets - bitvec_write_field(dest, wp, 3, 2); // "HH" + bitvec_write_field_lh(dest, wp, 3, 2); // "HH" bitvec_write_field(dest, wp, 1, 2); // "01" Packet Downlink Assignment bitvec_write_field(dest, wp,tlli,32); // TLLI bitvec_write_field(dest, wp,0x1,1); // switch TFI : on @@ -119,7 +119,7 @@ int Encoding::write_immediate_assignment( else { // GMS 04.08 10.5.2.37b 10.5.2.16 - bitvec_write_field(dest, wp, 3, 2); // "HH" + bitvec_write_field_lh(dest, wp, 3, 2); // "HH" bitvec_write_field(dest, wp, 0, 2); // "0" Packet Uplink Assignment if (single_block) { bitvec_write_field(dest, wp, 0, 1); // Block Allocation : Single Block Allocation -- cgit v1.2.1