net: lwm2m: LwM2M times series data update
Fixed problem for matching path url with or without '/' by change time series data structure to use struct lwm2m_obj_path. Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
This commit is contained in:
parent
3abd9c364a
commit
1800e629e6
3 changed files with 36 additions and 89 deletions
|
@ -2912,9 +2912,7 @@ static bool init_next_pending_timeseries_data(struct lwm2m_cache_read_info *cach
|
|||
sys_slist_t *lwm2m_path_list,
|
||||
sys_slist_t *lwm2m_path_free_list)
|
||||
{
|
||||
struct lwm2m_obj_path temp;
|
||||
uint32_t bytes_available = 0;
|
||||
int ret;
|
||||
|
||||
/* Check do we have still pending data to send */
|
||||
for (int i = 0; i < cache_temp->entry_size; i++) {
|
||||
|
@ -2923,12 +2921,9 @@ static bool init_next_pending_timeseries_data(struct lwm2m_cache_read_info *cach
|
|||
continue;
|
||||
}
|
||||
|
||||
ret = lwm2m_string_to_path(cache_temp->read_info[i].cache_data->path, &temp, '/');
|
||||
if (ret < 0) {
|
||||
return false;
|
||||
}
|
||||
/* Add to linked list */
|
||||
if (lwm2m_engine_add_path_to_list(lwm2m_path_list, lwm2m_path_free_list, &temp)) {
|
||||
if (lwm2m_engine_add_path_to_list(lwm2m_path_list, lwm2m_path_free_list,
|
||||
&cache_temp->read_info[i].cache_data->path)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue