Skip to content
Permalink
Browse files

net: lwm2m: fix automatic notification frequency

This fixes the issue where observations are automatically reported using
the minimum period instead of the maximum. This causes notifications to
be sent more frequently than configured when the resource does not
change.

Signed-off-by: Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com>
  • Loading branch information...
pieterjanc authored and jukkar committed Apr 13, 2019
1 parent 84b191e commit b7d4b0057e2c44b42bc31d4024abdee9c8e02ae5
Showing with 1 addition and 1 deletion.
  1. +1 −1 subsys/net/lib/lwm2m/lwm2m_engine.c
@@ -3795,7 +3795,7 @@ static int lwm2m_engine_service(void)
* - current timestamp > last_timestamp + max_period_sec
*/
} else if (timestamp > obs->last_timestamp +
K_SECONDS(obs->min_period_sec)) {
K_SECONDS(obs->max_period_sec)) {
obs->last_timestamp = k_uptime_get();
generate_notify_message(obs, false);
}

0 comments on commit b7d4b00

Please sign in to comment.
You can’t perform that action at this time.