diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-01-14 17:49:16 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-02-02 17:06:34 +0100 |
commit | 9b1a4ce485f785dee5ff70dd0b806b4c590b5a5b (patch) | |
tree | f5574525879e524691575919514739e26d0dfadb /src/decoding.cpp | |
parent | 64311942a4ccdfae2d363bd6f01b1667645a1f3b (diff) |
FIXUP Decoding::decode_gprs_acknack_bits bit ordering 2
Ticket: OW#????
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/decoding.cpp')
-rw-r--r-- | src/decoding.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decoding.cpp b/src/decoding.cpp index aa24d051..61397fc0 100644 --- a/src/decoding.cpp +++ b/src/decoding.cpp @@ -572,9 +572,9 @@ int Decoding::decode_gprs_acknack_bits(const Ack_Nack_Description_t *desc, urbb.data = (uint8_t *)desc->RECEIVED_BLOCK_BITMAP; urbb.data_len = sizeof(desc->RECEIVED_BLOCK_BITMAP); - for (int i = num_blocks; i > 0; i--) { - /* Set bit at the appropriate position (see 3GPP TS 44.060 12.3) */ - int is_ack = bitvec_get_bit_pos(&urbb, i - 1); + for (int i = urbb_len - num_blocks; i < urbb_len; i++) { + /* Get bit from the appropriate position (see 3GPP TS 44.060 12.3) */ + int is_ack = bitvec_get_bit_pos(&urbb, i); bitvec_set_bit(bits, is_ack == 1 ? ONE : ZERO); } |