-
Notifications
You must be signed in to change notification settings - Fork 2.1k
pkg/wakaama: bump version #10738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg/wakaama: bump version #10738
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| INCLUDES += -I$(RIOTPKG)/wakaama/wakaama | ||
| INCLUDES += -I$(PKGDIRBASE)/wakaama/riotbuild |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| From 2ab2f722a18025be55f12f482975b66548ce307b Mon Sep 17 00:00:00 2001 | ||
| From: Christian Manal <moenoel@informatik.uni-bremen.de> | ||
| Date: Tue, 9 Jan 2018 10:27:14 +0100 | ||
| Subject: [PATCH] fixed warnings in example objects | ||
|
|
||
| --- | ||
| examples/client/object_access_control.c | 2 +- | ||
| examples/client/object_security.c | 16 ---------------- | ||
| examples/client/object_server.c | 22 ++++++---------------- | ||
| 3 files changed, 7 insertions(+), 33 deletions(-) | ||
|
|
||
| diff --git a/examples/client/object_access_control.c b/examples/client/object_access_control.c | ||
| index 053546d..4a02438 100644 | ||
| --- a/examples/client/object_access_control.c | ||
| +++ b/examples/client/object_access_control.c | ||
| @@ -261,7 +261,7 @@ static uint8_t prv_write_resources(uint16_t instanceId, int numData, | ||
| acc_ctrl_ri_t* acValListSave = accCtrlOiP->accCtrlValList; | ||
| accCtrlOiP->accCtrlValList = NULL; | ||
|
|
||
| - int ri; | ||
| + unsigned int ri; | ||
| lwm2m_data_t* subTlvArray = tlvArray[i].value.asChildren.array; | ||
|
|
||
| if (tlvArray[i].value.asChildren.count == 0) | ||
| diff --git a/examples/client/object_security.c b/examples/client/object_security.c | ||
| index 901f92e..bfb5f85 100644 | ||
| --- a/examples/client/object_security.c | ||
| +++ b/examples/client/object_security.c | ||
| @@ -479,22 +479,6 @@ void copy_security_object(lwm2m_object_t * objectDest, lwm2m_object_t * objectSr | ||
| } | ||
| } | ||
|
|
||
| -void display_security_object(lwm2m_object_t * object) | ||
| -{ | ||
| -#ifdef WITH_LOGS | ||
| - fprintf(stdout, " /%u: Security object, instances:\r\n", object->objID); | ||
| - security_instance_t * instance = (security_instance_t *)object->instanceList; | ||
| - while (instance != NULL) | ||
| - { | ||
| - fprintf(stdout, " /%u/%u: instanceId: %u, uri: %s, isBootstrap: %s, shortId: %u, clientHoldOffTime: %u\r\n", | ||
| - object->objID, instance->instanceId, | ||
| - instance->instanceId, instance->uri, instance->isBootstrap ? "true" : "false", | ||
| - instance->shortID, instance->clientHoldOffTime); | ||
| - instance = (security_instance_t *)instance->next; | ||
| - } | ||
| -#endif | ||
| -} | ||
| - | ||
| void clean_security_object(lwm2m_object_t * objectP) | ||
| { | ||
| while (objectP->instanceList != NULL) | ||
| diff --git a/examples/client/object_server.c b/examples/client/object_server.c | ||
| index 2f0531e..d762c9b 100644 | ||
| --- a/examples/client/object_server.c | ||
| +++ b/examples/client/object_server.c | ||
| @@ -150,6 +150,9 @@ static uint8_t prv_server_discover(uint16_t instanceId, | ||
| uint8_t result; | ||
| int i; | ||
|
|
||
| + (void)instanceId; | ||
| + (void)objectP; | ||
| + | ||
| result = COAP_205_CONTENT; | ||
|
|
||
| // is the server asking for the full object ? | ||
| @@ -339,6 +342,9 @@ static uint8_t prv_server_execute(uint16_t instanceId, | ||
| { | ||
| server_instance_t * targetP; | ||
|
|
||
| + (void)buffer; | ||
| + (void)length; | ||
| + | ||
| targetP = (server_instance_t *)lwm2m_list_find(objectP->instanceList, instanceId); | ||
| if (NULL == targetP) return COAP_404_NOT_FOUND; | ||
|
|
||
| @@ -428,22 +434,6 @@ void copy_server_object(lwm2m_object_t * objectDest, lwm2m_object_t * objectSrc) | ||
| } | ||
| } | ||
|
|
||
| -void display_server_object(lwm2m_object_t * object) | ||
| -{ | ||
| -#ifdef WITH_LOGS | ||
| - fprintf(stdout, " /%u: Server object, instances:\r\n", object->objID); | ||
| - server_instance_t * serverInstance = (server_instance_t *)object->instanceList; | ||
| - while (serverInstance != NULL) | ||
| - { | ||
| - fprintf(stdout, " /%u/%u: instanceId: %u, shortServerId: %u, lifetime: %u, storing: %s, binding: %s\r\n", | ||
| - object->objID, serverInstance->instanceId, | ||
| - serverInstance->instanceId, serverInstance->shortServerId, serverInstance->lifetime, | ||
| - serverInstance->storing ? "true" : "false", serverInstance->binding); | ||
| - serverInstance = (server_instance_t *)serverInstance->next; | ||
| - } | ||
| -#endif | ||
| -} | ||
| - | ||
| lwm2m_object_t * get_server_object(int serverId, | ||
| const char* binding, | ||
| int lifetime, | ||
| -- | ||
| 2.1.4 | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| From 47d78e80ceb80a06e0cb9b0b7f7c959d04bd2c22 Mon Sep 17 00:00:00 2001 | ||
| From: Christian Manal <moenoel@informatik.uni-bremen.de> | ||
| Date: Mon, 5 Feb 2018 15:52:10 +0100 | ||
| Subject: [PATCH] Use lwm2m_strdup() instead of strdup() | ||
|
|
||
| --- | ||
| examples/client/object_security.c | 2 +- | ||
| 1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
|
||
| diff --git a/examples/client/object_security.c b/examples/client/object_security.c | ||
| index bfb5f85..d91f6e5 100644 | ||
| --- a/examples/client/object_security.c | ||
| +++ b/examples/client/object_security.c | ||
| @@ -540,7 +540,7 @@ lwm2m_object_t * get_security_object(int serverId, | ||
| targetP->securityMode = LWM2M_SECURITY_MODE_PRE_SHARED_KEY; | ||
| if (bsPskId) | ||
| { | ||
| - targetP->publicIdentity = strdup(bsPskId); | ||
| + targetP->publicIdentity = lwm2m_strdup(bsPskId); | ||
| targetP->publicIdLen = strlen(bsPskId); | ||
| } | ||
| if (pskLen > 0) | ||
| -- | ||
| 2.1.4 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| From 5d0fd8783b734e8adeec3b9393e84dc8f4f7eb1e Mon Sep 17 00:00:00 2001 | ||
| From: Christian Manal <moenoel@informatik.uni-bremen.de> | ||
| Date: Wed, 16 May 2018 11:30:02 +0200 | ||
| Subject: [PATCH] fixed alignment problem in lwm2m_data_t | ||
|
|
||
| --- | ||
| core/liblwm2m.h | 2 +- | ||
| 1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
|
||
| diff --git a/core/liblwm2m.h b/core/liblwm2m.h | ||
| index 3f16a6d..53616bf 100644 | ||
| --- a/core/liblwm2m.h | ||
| +++ b/core/liblwm2m.h | ||
| @@ -299,7 +299,6 @@ typedef struct _lwm2m_data_t lwm2m_data_t; | ||
|
|
||
| struct _lwm2m_data_t | ||
| { | ||
| - lwm2m_data_type_t type; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @moenoel is this safe? E.g wakaama code could eventually cast Do you remember the reason behind this?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not entirely sure if it's safe, though I didn't encounter any obvious problems running it. The reason for that change was to get rid of a memory alignment issue on the ARM boards we used. IIRC |
||
| uint16_t id; | ||
| union | ||
| { | ||
| @@ -322,6 +321,7 @@ struct _lwm2m_data_t | ||
| uint16_t objectInstanceId; | ||
| } asObjLink; | ||
| } value; | ||
| + lwm2m_data_type_t type; | ||
| }; | ||
|
|
||
| typedef enum | ||
| -- | ||
| 2.1.4 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| From c3d723c0544b51dcea92453856447a4b9da6d288 Mon Sep 17 00:00:00 2001 | ||
| From: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de> | ||
| Date: Mon, 4 Feb 2019 12:02:14 +0100 | ||
| Subject: [PATCH] change liblwm2m.h include in er-coap-13.c | ||
|
|
||
| --- | ||
| core/er-coap-13/er-coap-13.c | 2 +- | ||
| 1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
|
||
| diff --git a/core/er-coap-13/er-coap-13.c b/core/er-coap-13/er-coap-13.c | ||
| index 7b9d43a..647bb88 100644 | ||
| --- a/core/er-coap-13/er-coap-13.c | ||
| +++ b/core/er-coap-13/er-coap-13.c | ||
| @@ -46,7 +46,7 @@ | ||
|
|
||
| #include "er-coap-13.h" | ||
|
|
||
| -#include "../liblwm2m.h" /* for lwm2m_malloc() and lwm2m_free() */ | ||
| +#include "liblwm2m.h" /* for lwm2m_malloc() and lwm2m_free() */ | ||
|
|
||
| #define DEBUG 0 | ||
| #if DEBUG | ||
| -- | ||
| 2.17.1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| From e3fcae282ad8c1788fd082dc5431cc71944e64da Mon Sep 17 00:00:00 2001 | ||
| From: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de> | ||
| Date: Tue, 19 Feb 2019 17:36:50 +0100 | ||
| Subject: [PATCH] fix access control object read | ||
|
|
||
| --- | ||
| examples/client/object_access_control.c | 2 +- | ||
| 1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
|
||
| diff --git a/examples/client/object_access_control.c b/examples/client/object_access_control.c | ||
| index e2b1f77..149ec24 100644 | ||
| --- a/examples/client/object_access_control.c | ||
| +++ b/examples/client/object_access_control.c | ||
| @@ -95,7 +95,7 @@ static uint8_t prv_set_tlv(lwm2m_data_t* dataP, acc_ctrl_oi_t* accCtrlOiP) | ||
| subTlvP[ri].id = accCtrlRiP->resInstId; | ||
| lwm2m_data_encode_int(accCtrlRiP->accCtrlValue, &subTlvP[ri]); | ||
| } | ||
| - lwm2m_data_encode_instances(subTlvP, 2, dataP); | ||
| + lwm2m_data_encode_instances(subTlvP, ri, dataP); | ||
| return COAP_205_CONTENT; | ||
| } | ||
| } break; | ||
| -- | ||
| 2.17.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moenoel do you remember what was the reason for using
lwm2m_strdupinstead ofstrdup?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the reasons was consistency, as Wakaama defines prototypes for a few functions that it expects the specific implementation to fill in (e.g.
lwm2m_malloc()andlwm2m_free()) and it just seemed to make sense to use those wrappers throughout the Wakaama related code.There was at least one other reason, but I can't for the life of me remember what that was specifically.