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

precedence-related bug / wrong case value in device Obj / registration bug #22

Closed domedambrosio closed 10 years ago

domedambrosio commented 10 years ago

the resource ID for "reset error code" is 12 not 10. "!=" takes precedence over "&"

domedambrosio commented 10 years ago

the string location_path sent to the registering client was deallocated before being sent. My solution was to change the assignment in coap_set_header_location_path() with strdup() (and free it later) but I'm not sure it's the best way...

dnav commented 10 years ago

Hi,

The first patch is fine. For the second one, could you add some checks ? strdup() may fail. and please check response->location_path before freeing it. BTW, use lwm2m_free instead of free.

As a general comment: please put only one patch per pull request.

Regards

domedambrosio commented 10 years ago

Done. Sorry for the single pull request.