net: lwm2m: Reset ongoing notification in case token changes
In case observation token changes (the LwM2M server re-sends observation request to the client), the LwM2M engine should cancel any ongoing notifications based on the old token. Otherwise, it will be impossible to match the pending notification reply (ACK) with the observer context anymore, causing new notifications for this observation to stall. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
d79ba86c04
commit
1b21109c2c
5 changed files with 25 additions and 13 deletions
|
@ -238,7 +238,7 @@ ZTEST(lwm2m_engine, test_check_notifications)
|
|||
obs.last_timestamp = k_uptime_get();
|
||||
obs.event_timestamp = k_uptime_get() + 1000U;
|
||||
obs.resource_update = false;
|
||||
obs.active_tx_operation = false;
|
||||
obs.active_notify = NULL;
|
||||
|
||||
sys_slist_append(&ctx.observer, &obs.node);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue