[riot-notifications] [RIOT-OS/RIOT] pkg/wakaama: add get set functions and cleanup client connection (#16203)

Leandro Lanzieri notifications at github.com
Thu Jul 8 10:24:04 CEST 2021


@leandrolanzieri commented on this pull request.



> +
+static int _set_resource_data(lwm2m_client_data_t *client_data, const lwm2m_uri_t *uri,
+                              lwm2m_data_type_t type, void *in, size_t in_len)
+{
+    assert(client_data);
+    assert(uri);
+    assert(in);
+
+    int result = 0;
+    lwm2m_data_t *data = NULL;
+
+    /* try to find the requested object */
+    lwm2m_object_t *object = lwm2m_get_object_by_id(client_data, uri->objectId);
+    if (!object || !object->writeFunc) {
+        DEBUG("[lwm2m:get_data] could not find object with ID %d\n", uri->objectId);
+        result = -1;

Changed!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16203#discussion_r665978533
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210708/67d16a73/attachment-0001.htm>


More information about the notifications mailing list