Skip to content

Commit 60af898

Browse files
[sg toup] lwm2m: bugfix: don't mess up the count of updated objects.
Backported from 1c5e61f. Signed-off-by: Marc Lasch <[email protected]> (cherry picked from commit 2525ca6)
1 parent d310abc commit 60af898

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

subsys/net/lib/lwm2m/lwm2m_observation.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,10 @@ int lwm2m_notify_observer_path(struct lwm2m_obj_path *path)
352352
SYS_SLIST_FOR_EACH_CONTAINER(&sock_ctx[i]->observer, obs, node) {
353353
if (lwm2m_notify_observer_list(&obs->path_list, path)) {
354354
/* update the event time for this observer */
355-
ret = engine_observe_attribute_list_get(&obs->path_list, &nattrs,
356-
sock_ctx[i]->srv_obj_inst);
357-
if (ret < 0) {
358-
return ret;
355+
int rc = engine_observe_attribute_list_get(
356+
&obs->path_list, &nattrs, sock_ctx[i]->srv_obj_inst);
357+
if (rc < 0) {
358+
return rc;
359359
}
360360

361361
if (nattrs.pmin) {

0 commit comments

Comments
 (0)