intel / liblwm2m

liblwm2m is an implementation of the LWM2M protocol from the Open Mobile Alliance.
BSD 3-Clause "New" or "Revised" License
44 stars 28 forks source link

fix bad condition in prv_find_object() #6

Closed kartben closed 11 years ago

dnav commented 11 years ago

Hi, Did you run into a bug with this ? Because (in theory) the items in the linked list are sorted by ascending IDs.

dnav commented 11 years ago

OK, my bad. lwm2m_context_t::ObjectList used to be a sorted linked list. It is now an user provided array. I'm merging your change right now.

kartben commented 11 years ago

Yup, in the demo client if you GET coap://localhost:5683/1022
You will retrieve test object with ID 1024, cause the search loop retrieves the last object whose ID lower than the requested ID