Skip to content
Commit d002f8a5 authored by Robert Lubos's avatar Robert Lubos Committed by Anas Nashif
Browse files

net: lwm2m: Fix attribute sanity check



Validate the respective attribute parameters only if both are provided
at given level. This prevents from comparing for instance unset pmax
value (equal to 0) with some new pmin value sent by the server.

Additionally, fix the sanity check for the `pmax` value set on observer,
after fetching the attribute value at all levels (including the default
value at from the server object). Instead of using wrong max(pmin, pmax)
formula, set the pmax value only if it's a valid one (>= pmin),
otherwise ignore the value and set it to 0. This makes the notification
engine ignore the pmax value set for observation.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent b777b1dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment