Skip to content

Commit

Permalink
[sg temphack] net: lwm2m: Always send LwM2M object version
Browse files Browse the repository at this point in the history
Wakaama as of 2024-03-27 always needs to get an object version.

Upstream: eclipse-wakaama/wakaama#487 (comment)

(cherry picked from commit 8f701bbcf74bfebf09291ac67e734bd3a1830940)
  • Loading branch information
risikofrei authored and rettichschnidi committed May 8, 2024
1 parent 25e7d5b commit 8a15a2b
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions subsys/net/lib/lwm2m/lwm2m_registry.c
Original file line number Diff line number Diff line change
Expand Up @@ -2080,21 +2080,9 @@ struct lwm2m_engine_res_inst *lwm2m_engine_get_res_inst(const struct lwm2m_obj_p

bool lwm2m_engine_shall_report_obj_version(const struct lwm2m_engine_obj *obj)
{
/* For non-core objects, report version other than 1.0 */
if (!obj->is_core) {
return obj->version_major != 1 || obj->version_minor != 0;
}

/* For core objects, report version based on default version array. */
for (size_t i = 0; i < ARRAY_SIZE(default_obj_versions); i++) {
if (obj->obj_id != default_obj_versions[i].obj_id) {
continue;
}

return obj->version_major != default_obj_versions[i].version_major ||
obj->version_minor != default_obj_versions[i].version_minor;
}
(void)default_obj_versions;

// HACK: Always send ipso object version as a workaround
return true;
}

Expand Down

0 comments on commit 8a15a2b

Please sign in to comment.