mac_pdu: reset subheader state when deleting from PDU

when packing MAC PDUs, adding a new SDU might fail, for example
because RLC couldn't provide a new PDU. The muxer then needs
to delete the subheader from the PDU again.

When adding a padding BSR at the end, the same subheader is again
used to store the BSR, so any state in that subheader should be removed.

In the particular case, this was causing an issue when logging a LBSR
because the LCG buffer states are printed using the payload buffer,
which was still pointing to some memory that was used when trying
to add the new RLC PDU in the beginning.
This commit is contained in:
Andre Puschmann 2020-11-13 12:18:52 +01:00
parent 035d989737
commit 286844b3dd
1 changed files with 1 additions and 0 deletions

View File

@ -195,6 +195,7 @@ public:
nof_subheaders--;
}
if (cur_idx >= 0) {
subheaders[cur_idx].init();
cur_idx--;
}
}