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>
This commit is contained in:
parent
84b191edd2
commit
b7d4b0057e
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue