Hi Martin,
On 01/02/2019 05:50 AM, Martin Hundebøll wrote:
After the convertion to l_uintset, the creation of new contexts fails
due to a range error being returned from l_uintset_find_unused().
The error happens because the uinset is created with a min-value of 1,
but the start-value passed to l_uintset_find_unused() is initialized as
0.
Whoops, my bad. I forgot how my own API works.
Fix this by passing a start-value just past the last allocated context
id.
Won't this return an error if the last_context_id is at max? I think
the right fix is to back to the original logic, where
if (!gprs->last_context_id)
id = l_uintset_find_unused_min();
else
id = l_uintset_find-unused();
---
src/gprs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Regards,
-Denis
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono