Skip to content
Commit 280f159b authored by Michael Scott's avatar Michael Scott Committed by Anas Nashif
Browse files

net: lwm2m: fix logic for lwm2m_next_engine_obj_inst()



The object instance list isn't sorted by object instance id.  Let's
simplify this and fix the logic in lwm2m_next_engine_obj_inst() to make
sure that we always get the NEXT object instance by value of
obj_inst_id, not just the next object instance in the list.

NOTE: This change removes the "last" object instance pointer from the
parameters of lwm2m_next_engine_obj_inst().  Some of the logic to return
a NULL value for the end of the list has to be moved back into
do_read_op().

Signed-off-by: default avatarMichael Scott <mike@foundries.io>
parent 0f0455e0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment