Modified gprs_rlcmac_data_block_parse() function.
Implemented singular case of using Length Indicator field, which described in 10.4.14 TS 44.060.
diff --git a/gprs_rlcmac.cpp b/gprs_rlcmac.cpp
index ca94924..955b6b3 100644
--- a/gprs_rlcmac.cpp
+++ b/gprs_rlcmac.cpp
@@ -437,6 +437,13 @@
i++;
data_block_hdr_len += 1;
llc_pdu_num++;
+
+ // Singular case, TS 44.060 10.4.14
+ if (ul_data_block->LENGTH_INDICATOR[i] == 0)
+ {
+ break;
+ }
+
// New LLC PDU starts after the current LLC PDU and continues until
// the end of the RLC information field, no more extension octets.
if ((ul_data_block->M[i] == 1)&&(ul_data_block->E[i] == 1))
@@ -467,7 +474,15 @@
{
if (ul_data_block->E_1 == 0) // Extension octet follows immediately
{
- llc_pdu_len = ul_data_block->LENGTH_INDICATOR[num];
+ // Singular case, TS 44.060 10.4.14
+ if (ul_data_block->LENGTH_INDICATOR[num] == 0)
+ {
+ llc_pdu_len = UL_RLC_DATA_BLOCK_LEN - data_block_hdr_len;
+ }
+ else
+ {
+ llc_pdu_len = ul_data_block->LENGTH_INDICATOR[num];
+ }
}
else
{