Commit 91a75fe4 authored by Rúben Soares Silva's avatar Rúben Soares Silva Committed by Robert Schmidt

Fix pack/unpack of SRS Report TLV value.

Since report_tlv->length is in bytes, and the value is an array of uint32_t, the number of uint32_t to be pushed/pulled is (length + 3) /4.
parent 36f65160
......@@ -2603,13 +2603,13 @@ static uint8_t pack_nr_srs_report_tlv(nfapi_srs_report_tlv_t *report_tlv, uint8_
push32(report_tlv->length, ppWritePackedMsg, end))) {
return 0;
}
for(int i = 0; i < report_tlv->length; i++) {
#ifndef ENABLE_AERIAL
for (int i = 0; i < (report_tlv->length + 3) / 4; i++) {
if (!push32(report_tlv->value[i], ppWritePackedMsg, end)) {
return 0;
}
}
#endif
return 1;
}
......@@ -4569,7 +4569,7 @@ static uint8_t unpack_nr_srs_report_tlv(nfapi_srs_report_tlv_t *report_tlv, uint
return 0;
}
for(int i = 0; i < report_tlv->length; i++) {
for (int i = 0; i < (report_tlv->length + 3) / 4; i++) {
if (!pull32(ppReadPackedMsg, &report_tlv->value[i], end)) {
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment