net: lwm2m: Reset server timestamps after bootstrap

Reset the server timestamps after bootstrap to handle a case
where a new server instance has replaced the bootstrap server
instance.

Signed-off-by: Stig Bjørlykke <stig.bjorlykke@nordicsemi.no>
This commit is contained in:
Stig Bjørlykke 2024-11-26 14:10:52 +01:00 committed by Fabio Baltieri
commit 95333705e5

View file

@ -849,6 +849,9 @@ static int sm_bootstrap_trans_done(void)
client.ctx->sec_obj_inst = -1;
client.use_bootstrap = false;
/* reset server timestamps */
lwm2m_server_reset_timestamps();
set_sm_state(ENGINE_DO_REGISTRATION);
return 0;