mirror of https://github.com/PentHertz/srsLTE.git
Fix for tests, minor fix for RLC UM
This commit is contained in:
parent
494802ba9b
commit
49a105baed
|
@ -277,7 +277,7 @@ int rlc_um::build_data_pdu(uint8_t *payload, uint32_t nof_bytes)
|
|||
int head_len = rlc_um_packed_length(&header);
|
||||
int pdu_space = nof_bytes;
|
||||
|
||||
if(pdu_space <= head_len)
|
||||
if(pdu_space <= head_len + 1)
|
||||
{
|
||||
log->warning("%s Cannot build a PDU - %d bytes available, %d bytes required for header\n",
|
||||
rrc->get_rb_name(lcid).c_str(), nof_bytes, head_len);
|
||||
|
|
|
@ -123,7 +123,7 @@ void basic_test()
|
|||
byte_buffer_t pdu_bufs[NBUFS];
|
||||
for(int i=0;i<NBUFS;i++)
|
||||
{
|
||||
len = rlc1.read_pdu(pdu_bufs[i].msg, 3); // 3 bytes for header + payload
|
||||
len = rlc1.read_pdu(pdu_bufs[i].msg, 4); // 3 bytes for header + payload
|
||||
pdu_bufs[i].N_bytes = len;
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ void loss_test()
|
|||
byte_buffer_t pdu_bufs[NBUFS];
|
||||
for(int i=0;i<NBUFS;i++)
|
||||
{
|
||||
len = rlc1.read_pdu(pdu_bufs[i].msg, 3); // 3 bytes for header + payload
|
||||
len = rlc1.read_pdu(pdu_bufs[i].msg, 4); // 3 bytes for header + payload
|
||||
pdu_bufs[i].N_bytes = len;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue