Attention is currently required from: fixeria.
fixeria uploaded patch set #2 to this change.
The following approvals got outdated and were removed: Verified-1 by Jenkins Builder
core: fix wrong logic in _osmo_it_q_dequeue()
If the given queue is empty, queue->list.next points to &queue->list.
Current implementation would call llist_del() on the queue's llist_head,
decrement queue->current_length (which will be 0), and return a pointer
to &queue->list to the caller. This is completely wrong.
- Use the existing item_dequeue(), which does exactly what we need.
- Do not decrement the current_length if nothing was dequeued.
- Uncomment code in the unit test, we should not crash anymore.
Change-Id: I63094df73b166b549616c869ad908e9f4f7d46d1
Fixes: CID#336557
---
M src/core/it_q.c
M tests/it_q/it_q_test.c
M tests/it_q/it_q_test.ok
3 files changed, 25 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/94/35294/2
To view, visit change 35294. To unsubscribe, or for help writing mail filters, visit settings.