Skip to content

Commit b7d4b00

Browse files
pieterjancjukkar
authored andcommitted
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 <[email protected]>
1 parent 84b191e commit b7d4b00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/net/lib/lwm2m/lwm2m_engine.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3795,7 +3795,7 @@ static int lwm2m_engine_service(void)
37953795
* - current timestamp > last_timestamp + max_period_sec
37963796
*/
37973797
} else if (timestamp > obs->last_timestamp +
3798-
K_SECONDS(obs->min_period_sec)) {
3798+
K_SECONDS(obs->max_period_sec)) {
37993799
obs->last_timestamp = k_uptime_get();
38003800
generate_notify_message(obs, false);
38013801
}

0 commit comments

Comments
 (0)