net: lwm2m: Fix Registration Update send on object creation
The Registration Update message should be sent whenever an object instance is created or deleted. Currently this was only the case when an object instance was created by the server and not by the application. Fix this by triggerng the Registration Update from the API function as well. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
947bd45260
commit
66c5fdc984
1 changed files with 10 additions and 1 deletions
|
@ -1444,7 +1444,16 @@ int lwm2m_engine_create_obj_inst(char *pathstr)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return lwm2m_create_obj_inst(path.obj_id, path.obj_inst_id, &obj_inst);
|
ret = lwm2m_create_obj_inst(path.obj_id, path.obj_inst_id, &obj_inst);
|
||||||
|
if (ret < 0) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(CONFIG_LWM2M_RD_CLIENT_SUPPORT)
|
||||||
|
engine_trigger_update(true);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int lwm2m_engine_set_res_data(char *pathstr, void *data_ptr, uint16_t data_len,
|
int lwm2m_engine_set_res_data(char *pathstr, void *data_ptr, uint16_t data_len,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue