fix RLC AM issue when building segements that require N_li in header

This commit is contained in:
Andre Puschmann 2018-07-30 14:54:49 +02:00
parent ec9b7e921a
commit 99964c1054
1 changed files with 5 additions and 0 deletions

View File

@ -663,6 +663,11 @@ int rlc_am::build_segment(uint8_t *payload, uint32_t nof_bytes, rlc_amd_retx_t r
uint32_t pdu_space = 0;
head_len = rlc_am_packed_length(&new_header);
if (old_header.N_li > 0) {
// Make sure we can fit at least one N_li element if old header contained at least one
head_len += 2;
}
if(nof_bytes <= head_len)
{
log->warning("%s Cannot build a PDU segment - %d bytes available, %d bytes required for header\n",