[riot-notifications] [RIOT-OS/RIOT] pkg/wakaama: fix object common `get` functions (#16691)

Leandro Lanzieri notifications at github.com
Fri Jul 30 09:51:14 CEST 2021

### Contribution description
#16203 introduced multiple convenience functions to access resources of different types. While string resources are `NULL` terminated, that's not the case for opaque ones. As the length is not always known beforehand, this fixes the API to return the amount of read bytes. As the APIs were not part of the last release, no need to deprecate the old ones.

Also `lwm2m_set_objlink_by_path` is fixed.

### Testing procedure
- `examples/wakaama` should work as usual
- The get/set functions should still work (can be tested by checking the resources in the application above)

### Issues/PRs references

Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * pkg/wakaama/common: fix lwm2m_set_objlink_by_path
  * pkg/wakaama/common: return length when reading strings and opaques

-- File Changes --

    M pkg/wakaama/contrib/lwm2m_client_connection.c (3)
    M pkg/wakaama/contrib/objects/common.c (71)
    M pkg/wakaama/include/objects/common.h (44)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210730/20aba3be/attachment.htm>

More information about the notifications mailing list