Commit 43f5eecd authored by Cedric Roux's avatar Cedric Roux

nr rlc am: bugfix: use sn_compare_tx() to compare SNs

The use of < is not correct. SNs are cyclic. We must use sn_compare_tx().
parent e3dbc977
......@@ -437,9 +437,10 @@ process_next_pdu:
goto process_retransmit_list_head;
if (cur_retransmit_list == NULL)
goto process_wait_list_head;
if (cur_wait_list->sdu->sn < cur_retransmit_list->sdu->sn
|| (cur_wait_list->sdu->sn == cur_retransmit_list->sdu->sn &&
cur_wait_list->so < cur_retransmit_list->so))
cmp = sn_compare_tx(entity, cur_wait_list->sdu->sn, cur_retransmit_list->sdu->sn);
if (cmp < 0
|| (cmp == 0
&& cur_wait_list->so < cur_retransmit_list->so))
goto process_wait_list_head;
goto process_retransmit_list_head;
......
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