pkg: wakaama: Fix and update wakaama package to version fe48d45
* Fix the not updated `PKG_TEMP_DIR` to `PKG_BUILDDIR` * Bump the version * Make the patches apply and fix warnings/errors
This commit is contained in:
parent
4334b2cf6a
commit
bc62f54146
@ -1,6 +1,6 @@
|
|||||||
PKG_NAME=wakaama
|
PKG_NAME=wakaama
|
||||||
PKG_URL=https://github.com/eclipse/wakaama.git
|
PKG_URL=https://github.com/eclipse/wakaama.git
|
||||||
PKG_VERSION=69a32cfae39f66fe4eec4cc8d1cd48ced7ad447c
|
PKG_VERSION=ee80c224622684ee47c17c57918904cffd00c4d2
|
||||||
PKG_LICENSE=EDL-1.0,EPL-1.0
|
PKG_LICENSE=EDL-1.0,EPL-1.0
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
@ -11,7 +11,7 @@ all: patch
|
|||||||
patch: git-download
|
patch: git-download
|
||||||
mkdir -p "$(PKG_BUILDDIR)/riotbuild"
|
mkdir -p "$(PKG_BUILDDIR)/riotbuild"
|
||||||
cp $(PKG_BUILDDIR)/core/*.c $(PKG_BUILDDIR)/core/*.h $(PKG_BUILDDIR)/riotbuild
|
cp $(PKG_BUILDDIR)/core/*.c $(PKG_BUILDDIR)/core/*.h $(PKG_BUILDDIR)/riotbuild
|
||||||
cp $(PKG_BUILDDIR)/core/er-coap-13/*.c $(PKG_TEMP_DIR)/core/er-coap-13/*.h $(PKG_BUILDDIR)/riotbuild
|
cp $(PKG_BUILDDIR)/core/er-coap-13/*.c $(PKG_BUILDDIR)/core/er-coap-13/*.h $(PKG_BUILDDIR)/riotbuild
|
||||||
|
|
||||||
echo 'MODULE:=wakaama' > $(PKG_BUILDDIR)/riotbuild/Makefile
|
echo 'MODULE:=wakaama' > $(PKG_BUILDDIR)/riotbuild/Makefile
|
||||||
echo 'include $$(RIOTBASE)/Makefile.base' >> $(PKG_BUILDDIR)/riotbuild/Makefile
|
echo 'include $$(RIOTBASE)/Makefile.base' >> $(PKG_BUILDDIR)/riotbuild/Makefile
|
||||||
|
|||||||
25
pkg/wakaama/patches/0001-change-header-location.patch
Normal file
25
pkg/wakaama/patches/0001-change-header-location.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 71152ca234e7af2bd96ec3a425976c818edb8753 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Manal <moenoel@informatik.uni-bremen.de>
|
||||||
|
Date: Thu, 23 Nov 2017 10:55:07 +0100
|
||||||
|
Subject: [PATCH 01/12] change header location
|
||||||
|
|
||||||
|
---
|
||||||
|
core/internals.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/core/internals.h b/core/internals.h
|
||||||
|
index 30d3942..79c6c4c 100644
|
||||||
|
--- a/core/internals.h
|
||||||
|
+++ b/core/internals.h
|
||||||
|
@@ -61,7 +61,7 @@
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
-#include "er-coap-13/er-coap-13.h"
|
||||||
|
+#include "er-coap-13.h"
|
||||||
|
|
||||||
|
#ifdef LWM2M_WITH_LOGS
|
||||||
|
#include <inttypes.h>
|
||||||
|
--
|
||||||
|
2.1.4
|
||||||
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
From ff63a7a7d6b23bbc912e950403ccada15c2ce83d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Darredevil <alex.darredevil@gmail.com>
|
|
||||||
Date: Thu, 13 Aug 2015 12:06:47 +0100
|
|
||||||
Subject: [PATCH 1/6] changing header location
|
|
||||||
|
|
||||||
---
|
|
||||||
core/internals.h | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/core/internals.h b/core/internals.h
|
|
||||||
index 11b420c..36d7d12 100644
|
|
||||||
--- a/core/internals.h
|
|
||||||
+++ b/core/internals.h
|
|
||||||
@@ -60,7 +60,7 @@
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
-#include "er-coap-13/er-coap-13.h"
|
|
||||||
+#include "er-coap-13.h"
|
|
||||||
|
|
||||||
#ifdef WITH_LOGS
|
|
||||||
#define LOG(...) fprintf(stderr, __VA_ARGS__)
|
|
||||||
--
|
|
||||||
1.9.1
|
|
||||||
29
pkg/wakaama/patches/0002-define-endianness.patch
Normal file
29
pkg/wakaama/patches/0002-define-endianness.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 8497756fbb1bfdc283f98430e101cd89ab84c18d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Manal <moenoel@informatik.uni-bremen.de>
|
||||||
|
Date: Thu, 23 Nov 2017 10:55:57 +0100
|
||||||
|
Subject: [PATCH 02/12] define endianness
|
||||||
|
|
||||||
|
---
|
||||||
|
core/internals.h | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/core/internals.h b/core/internals.h
|
||||||
|
index 79c6c4c..f6490d1 100644
|
||||||
|
--- a/core/internals.h
|
||||||
|
+++ b/core/internals.h
|
||||||
|
@@ -63,6 +63,12 @@
|
||||||
|
|
||||||
|
#include "er-coap-13.h"
|
||||||
|
|
||||||
|
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||||
|
+#define LWM2M_LITTLE_ENDIAN
|
||||||
|
+#else
|
||||||
|
+#define LWM2M_BIG_ENDIAN
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifdef LWM2M_WITH_LOGS
|
||||||
|
#include <inttypes.h>
|
||||||
|
#define LOG(STR) lwm2m_printf("[%s:%d] " STR "\r\n", __func__ , __LINE__)
|
||||||
|
--
|
||||||
|
2.1.4
|
||||||
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
From 1d2282a5bf10f8e0bed285da028dd42354b5851d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Darredevil <alex.darredevil@gmail.com>
|
|
||||||
Date: Thu, 13 Aug 2015 15:18:50 +0100
|
|
||||||
Subject: [PATCH 2/6] defined endianness
|
|
||||||
|
|
||||||
---
|
|
||||||
core/tlv.c | 6 ++++++
|
|
||||||
1 file changed, 6 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/core/tlv.c b/core/tlv.c
|
|
||||||
index 0586f3d..08c66f1 100644
|
|
||||||
--- a/core/tlv.c
|
|
||||||
+++ b/core/tlv.c
|
|
||||||
@@ -24,6 +24,12 @@
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <float.h>
|
|
||||||
|
|
||||||
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
|
||||||
+#define LWM2M_LITTLE_ENDIAN
|
|
||||||
+#else
|
|
||||||
+#define LWM2M_BIG_ENDIAN
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#ifndef LWM2M_BIG_ENDIAN
|
|
||||||
#ifndef LWM2M_LITTLE_ENDIAN
|
|
||||||
#error Please define LWM2M_BIG_ENDIAN or LWM2M_LITTLE_ENDIAN
|
|
||||||
--
|
|
||||||
1.9.1
|
|
||||||
@ -1,18 +1,18 @@
|
|||||||
From a20abf688bb2543f1bdf3e05d237092421408f2e Mon Sep 17 00:00:00 2001
|
From cb33c63fad39a27b7164965f7ba3649852ab5104 Mon Sep 17 00:00:00 2001
|
||||||
From: Darredevil <alex.darredevil@gmail.com>
|
From: Christian Manal <moenoel@informatik.uni-bremen.de>
|
||||||
Date: Thu, 13 Aug 2015 12:36:31 +0100
|
Date: Thu, 23 Nov 2017 11:08:53 +0100
|
||||||
Subject: [PATCH 3/6] fixed warnings in er-coap-13.c
|
Subject: [PATCH 03/12] fixed warnings in er-coap-13.c
|
||||||
|
|
||||||
---
|
---
|
||||||
core/er-coap-13/er-coap-13.c | 15 +++++++++------
|
core/er-coap-13/er-coap-13.c | 5 ++++-
|
||||||
1 file changed, 9 insertions(+), 6 deletions(-)
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/core/er-coap-13/er-coap-13.c b/core/er-coap-13/er-coap-13.c
|
diff --git a/core/er-coap-13/er-coap-13.c b/core/er-coap-13/er-coap-13.c
|
||||||
index cef62cc..0df7e4f 100644
|
index 67d1bb3..647bb88 100644
|
||||||
--- a/core/er-coap-13/er-coap-13.c
|
--- a/core/er-coap-13/er-coap-13.c
|
||||||
+++ b/core/er-coap-13/er-coap-13.c
|
+++ b/core/er-coap-13/er-coap-13.c
|
||||||
@@ -382,7 +382,7 @@ coap_get_variable(const uint8_t *buffer, size_t length, const char *name, const
|
@@ -381,7 +381,7 @@ coap_get_variable(const uint8_t *buffer, size_t length, const char *name, const
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------*/
|
||||||
uint16_t
|
uint16_t
|
||||||
-coap_get_mid()
|
-coap_get_mid()
|
||||||
@ -20,7 +20,7 @@ index cef62cc..0df7e4f 100644
|
|||||||
{
|
{
|
||||||
return ++current_mid;
|
return ++current_mid;
|
||||||
}
|
}
|
||||||
@@ -750,6 +750,9 @@ coap_get_query_variable(void *packet, const char *name, const char **output)
|
@@ -860,6 +860,9 @@ coap_get_query_variable(void *packet, const char *name, const char **output)
|
||||||
return coap_get_variable(coap_pkt->uri_query, coap_pkt->uri_query_len, name, output);
|
return coap_get_variable(coap_pkt->uri_query, coap_pkt->uri_query_len, name, output);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
@ -29,51 +29,7 @@ index cef62cc..0df7e4f 100644
|
|||||||
+ (void)output;
|
+ (void)output;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.1.4
|
||||||
|
|
||||||
@@ -939,7 +942,7 @@ coap_get_header_proxy_uri(void *packet, const char **uri)
|
|
||||||
|
|
||||||
if (!IS_OPTION(coap_pkt, COAP_OPTION_PROXY_URI)) return 0;
|
|
||||||
|
|
||||||
- *uri = coap_pkt->proxy_uri;
|
|
||||||
+ *uri = (const char *)coap_pkt->proxy_uri;
|
|
||||||
return coap_pkt->proxy_uri_len;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -948,7 +951,7 @@ coap_set_header_proxy_uri(void *packet, const char *uri)
|
|
||||||
{
|
|
||||||
coap_packet_t *const coap_pkt = (coap_packet_t *) packet;
|
|
||||||
|
|
||||||
- coap_pkt->proxy_uri = uri;
|
|
||||||
+ coap_pkt->proxy_uri = (const uint8_t *)uri;
|
|
||||||
coap_pkt->proxy_uri_len = strlen(uri);
|
|
||||||
|
|
||||||
SET_OPTION(coap_pkt, COAP_OPTION_PROXY_URI);
|
|
||||||
@@ -1120,7 +1123,7 @@ coap_get_header_location_query(void *packet, const char **query)
|
|
||||||
|
|
||||||
if (!IS_OPTION(coap_pkt, COAP_OPTION_LOCATION_QUERY)) return 0;
|
|
||||||
|
|
||||||
- *query = coap_pkt->location_query;
|
|
||||||
+ *query = (const char *)coap_pkt->location_query;
|
|
||||||
return coap_pkt->location_query_len;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1131,7 +1134,7 @@ coap_set_header_location_query(void *packet, char *query)
|
|
||||||
|
|
||||||
while (query[0]=='?') ++query;
|
|
||||||
|
|
||||||
- coap_pkt->location_query = query;
|
|
||||||
+ coap_pkt->location_query = (uint8_t *)query;
|
|
||||||
coap_pkt->location_query_len = strlen(query);
|
|
||||||
|
|
||||||
SET_OPTION(coap_pkt, COAP_OPTION_LOCATION_QUERY);
|
|
||||||
@@ -1231,7 +1234,7 @@ coap_get_header_size(void *packet, uint32_t *size)
|
|
||||||
coap_packet_t *const coap_pkt = (coap_packet_t *) packet;
|
|
||||||
|
|
||||||
if (!IS_OPTION(coap_pkt, COAP_OPTION_SIZE)) return 0;
|
|
||||||
-
|
|
||||||
+
|
|
||||||
*size = coap_pkt->size;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
1.9.1
|
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
From dd5fd3021b0473c0bd6278fe574acbb8a9aa3504 Mon Sep 17 00:00:00 2001
|
From b3195957e4fa9217f71f3d5f4505aa463516abed Mon Sep 17 00:00:00 2001
|
||||||
From: Darredevil <alex.darredevil@gmail.com>
|
From: Christian Manal <moenoel@informatik.uni-bremen.de>
|
||||||
Date: Thu, 13 Aug 2015 12:43:09 +0100
|
Date: Thu, 23 Nov 2017 11:11:17 +0100
|
||||||
Subject: [PATCH 4/6] fixed warnings in packet.c
|
Subject: [PATCH 04/12] fixed warnings in packet.c
|
||||||
|
|
||||||
---
|
---
|
||||||
core/packet.c | 5 +++++
|
core/packet.c | 5 +++++
|
||||||
1 file changed, 5 insertions(+)
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
diff --git a/core/packet.c b/core/packet.c
|
diff --git a/core/packet.c b/core/packet.c
|
||||||
index 76715ff..886d17b 100644
|
index dc998d3..5e9d9c1 100644
|
||||||
--- a/core/packet.c
|
--- a/core/packet.c
|
||||||
+++ b/core/packet.c
|
+++ b/core/packet.c
|
||||||
@@ -97,6 +97,9 @@ static void handle_reset(lwm2m_context_t * contextP,
|
@@ -97,6 +97,9 @@ static void handle_reset(lwm2m_context_t * contextP,
|
||||||
@ -19,16 +19,17 @@ index 76715ff..886d17b 100644
|
|||||||
+ (void)fromSessionH;
|
+ (void)fromSessionH;
|
||||||
+ (void)message;
|
+ (void)message;
|
||||||
#ifdef LWM2M_CLIENT_MODE
|
#ifdef LWM2M_CLIENT_MODE
|
||||||
cancel_observe(contextP, message->mid, fromSessionH);
|
LOG("Entering");
|
||||||
#endif
|
observe_cancel(contextP, message->mid, fromSessionH);
|
||||||
@@ -107,6 +110,8 @@ static coap_status_t handle_request(lwm2m_context_t * contextP,
|
@@ -108,6 +111,8 @@ static uint8_t handle_request(lwm2m_context_t * contextP,
|
||||||
coap_packet_t * message,
|
coap_packet_t * message,
|
||||||
coap_packet_t * response)
|
coap_packet_t * response)
|
||||||
{
|
{
|
||||||
+ (void)contextP;
|
+ (void)contextP;
|
||||||
+ (void)fromSessionH;
|
+ (void)fromSessionH;
|
||||||
lwm2m_uri_t * uriP;
|
lwm2m_uri_t * uriP;
|
||||||
coap_status_t result = NOT_FOUND_4_04;
|
uint8_t result = COAP_IGNORE;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.1.4
|
||||||
|
|
||||||
--
|
|
||||||
1.9.1
|
|
||||||
|
|||||||
@ -0,0 +1,26 @@
|
|||||||
|
From b4060e323b9683f13f6e717ddbbba8fed5bb6d3d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Manal <moenoel@informatik.uni-bremen.de>
|
||||||
|
Date: Thu, 23 Nov 2017 11:28:37 +0100
|
||||||
|
Subject: [PATCH 05/12] fixed warnings in registration.c
|
||||||
|
|
||||||
|
---
|
||||||
|
core/registration.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/core/registration.c b/core/registration.c
|
||||||
|
index 55d6ed8..a2fca3f 100644
|
||||||
|
--- a/core/registration.c
|
||||||
|
+++ b/core/registration.c
|
||||||
|
@@ -1283,6 +1283,9 @@ void registration_step(lwm2m_context_t * contextP,
|
||||||
|
time_t currentTime,
|
||||||
|
time_t * timeoutP)
|
||||||
|
{
|
||||||
|
+ (void)contextP;
|
||||||
|
+ (void)currentTime;
|
||||||
|
+ (void)timeoutP;
|
||||||
|
#ifdef LWM2M_CLIENT_MODE
|
||||||
|
lwm2m_server_t * targetP = contextP->serverList;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.1.4
|
||||||
|
|
||||||
@ -1,50 +0,0 @@
|
|||||||
From 26d765aee65ef8eeae0f8b61c885c017ad938c94 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Darredevil <alex.darredevil@gmail.com>
|
|
||||||
Date: Thu, 13 Aug 2015 12:58:42 +0100
|
|
||||||
Subject: [PATCH 5/6] fixed warnings in tlv.c
|
|
||||||
|
|
||||||
---
|
|
||||||
pkg/wakaama/wakaama/tlv.c | 7 ++++---
|
|
||||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/core/tlv.c b/core/tlv.c
|
|
||||||
index 91a0ee9..0586f3d 100644
|
|
||||||
--- a/core/tlv.c
|
|
||||||
+++ b/core/tlv.c
|
|
||||||
@@ -14,7 +14,7 @@
|
|
||||||
* David Navarro, Intel Corporation - initial API and implementation
|
|
||||||
* Fabien Fleutot - Please refer to git log
|
|
||||||
* Bosch Software Innovations GmbH - Please refer to git log
|
|
||||||
- *
|
|
||||||
+ *
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
#include "internals.h"
|
|
||||||
@@ -307,6 +307,7 @@ int lwm2m_opaqueToFloat(uint8_t * buffer,
|
|
||||||
size_t buffer_len,
|
|
||||||
double * dataP)
|
|
||||||
{
|
|
||||||
+ (void)buffer;
|
|
||||||
switch (buffer_len)
|
|
||||||
{
|
|
||||||
case 4:
|
|
||||||
@@ -614,7 +615,7 @@ int lwm2m_tlv_decode_int(lwm2m_tlv_t * tlvP,
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = lwm2m_opaqueToInt(tlvP->value, tlvP->length, dataP);
|
|
||||||
- if (result == tlvP->length)
|
|
||||||
+ if ((size_t)result == tlvP->length)
|
|
||||||
{
|
|
||||||
result = 1;
|
|
||||||
}
|
|
||||||
@@ -710,7 +711,7 @@ int lwm2m_tlv_decode_float(lwm2m_tlv_t * tlvP,
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = lwm2m_opaqueToFloat(tlvP->value, tlvP->length, dataP);
|
|
||||||
- if (result == tlvP->length)
|
|
||||||
+ if ((size_t)result == tlvP->length)
|
|
||||||
{
|
|
||||||
result = 1;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
1.9.1
|
|
||||||
@ -1,33 +1,33 @@
|
|||||||
From 2f8c7bd7eabd55f2f4dd0da5e2a252b95f0e51c9 Mon Sep 17 00:00:00 2001
|
From 91e610adbf53342088242e7bc6a207fc4b48a715 Mon Sep 17 00:00:00 2001
|
||||||
From: Darredevil <alex.darredevil@gmail.com>
|
From: Christian Manal <moenoel@informatik.uni-bremen.de>
|
||||||
Date: Thu, 13 Aug 2015 13:03:42 +0100
|
Date: Thu, 23 Nov 2017 11:35:06 +0100
|
||||||
Subject: [PATCH 6/6] fixed warnings in utils.c
|
Subject: [PATCH 06/12] fixed warnings in utils.c
|
||||||
|
|
||||||
---
|
---
|
||||||
core/utils.c | 4 +++-
|
core/utils.c | 3 ++-
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/core/utils.c b/core/utils.c
|
diff --git a/core/utils.c b/core/utils.c
|
||||||
index f62e932..c07ef4b 100644
|
index 715dec9..a06d1f6 100644
|
||||||
--- a/core/utils.c
|
--- a/core/utils.c
|
||||||
+++ b/core/utils.c
|
+++ b/core/utils.c
|
||||||
@@ -13,7 +13,7 @@
|
@@ -52,7 +52,6 @@
|
||||||
* Contributors:
|
#include <stdio.h>
|
||||||
* David Navarro, Intel Corporation - initial API and implementation
|
#include <float.h>
|
||||||
* Toby Jaffey - Please refer to git log
|
|
||||||
- *
|
-
|
||||||
+ *
|
int utils_textToInt(uint8_t * buffer,
|
||||||
*******************************************************************************/
|
int length,
|
||||||
|
int64_t * dataP)
|
||||||
/*
|
@@ -376,6 +375,8 @@ lwm2m_server_t * utils_findServer(lwm2m_context_t * contextP,
|
||||||
@@ -357,6 +357,8 @@ lwm2m_server_t * prv_findServer(lwm2m_context_t * contextP,
|
|
||||||
lwm2m_server_t * utils_findBootstrapServer(lwm2m_context_t * contextP,
|
lwm2m_server_t * utils_findBootstrapServer(lwm2m_context_t * contextP,
|
||||||
void * fromSessionH)
|
void * fromSessionH)
|
||||||
{
|
{
|
||||||
+ (void)contextP;
|
+ (void)contextP;
|
||||||
+ (void)fromSessionH;
|
+ (void)fromSessionH;
|
||||||
#ifdef LWM2M_CLIENT_MODE
|
#ifdef LWM2M_CLIENT_MODE
|
||||||
|
|
||||||
lwm2m_server_t * targetP;
|
lwm2m_server_t * targetP;
|
||||||
--
|
--
|
||||||
1.9.1
|
2.1.4
|
||||||
|
|
||||||
|
|||||||
@ -1,33 +0,0 @@
|
|||||||
From ed834183706e55f505d52299c434ef948d7fe22f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Darredevil <alex.darredevil@gmail.com>
|
|
||||||
Date: Tue, 18 Aug 2015 11:43:15 +0100
|
|
||||||
Subject: [PATCH 1/4] fixed warnings in bootstrap.c
|
|
||||||
|
|
||||||
---
|
|
||||||
core/bootstrap.c | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/core/bootstrap.c b/core/bootstrap.c
|
|
||||||
index 2bd6d82..282bc11 100644
|
|
||||||
--- a/core/bootstrap.c
|
|
||||||
+++ b/core/bootstrap.c
|
|
||||||
@@ -97,6 +97,8 @@ void handle_bootstrap_response(lwm2m_context_t * context,
|
|
||||||
coap_packet_t * message,
|
|
||||||
void * fromSessionH)
|
|
||||||
{
|
|
||||||
+ (void)fromSessionH;
|
|
||||||
+
|
|
||||||
if (COAP_204_CHANGED == message->code)
|
|
||||||
{
|
|
||||||
context->bsState = BOOTSTRAP_PENDING;
|
|
||||||
@@ -221,6 +223,8 @@ void update_bootstrap_state(lwm2m_context_t * context,
|
|
||||||
coap_status_t handle_bootstrap_finish(lwm2m_context_t * context,
|
|
||||||
void * fromSessionH)
|
|
||||||
{
|
|
||||||
+ (void)fromSessionH;
|
|
||||||
+
|
|
||||||
if (context->bsState == BOOTSTRAP_PENDING)
|
|
||||||
{
|
|
||||||
context->bsState = BOOTSTRAP_FINISHED;
|
|
||||||
--
|
|
||||||
1.9.1
|
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
From f7c65c6c3ad1c00fc9d10b0bd25e6119d1020f88 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Manal <moenoel@informatik.uni-bremen.de>
|
||||||
|
Date: Thu, 23 Nov 2017 11:58:52 +0100
|
||||||
|
Subject: [PATCH 07/12] fixed warnings in transaction.c
|
||||||
|
|
||||||
|
---
|
||||||
|
core/transaction.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/core/transaction.c b/core/transaction.c
|
||||||
|
index fd7d5d4..2dd86b1 100644
|
||||||
|
--- a/core/transaction.c
|
||||||
|
+++ b/core/transaction.c
|
||||||
|
@@ -377,7 +377,7 @@ int transaction_send(lwm2m_context_t * contextP,
|
||||||
|
|
||||||
|
if (!transacP->ack_received)
|
||||||
|
{
|
||||||
|
- long unsigned timeout;
|
||||||
|
+ long unsigned timeout = 0;
|
||||||
|
|
||||||
|
if (0 == transacP->retrans_counter)
|
||||||
|
{
|
||||||
|
--
|
||||||
|
2.1.4
|
||||||
|
|
||||||
62
pkg/wakaama/patches/0008-fixed-warnings-in-bootstrap.c.patch
Normal file
62
pkg/wakaama/patches/0008-fixed-warnings-in-bootstrap.c.patch
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
From 63d29e3038c3cfd70cf10ee168f78209e29ae5d2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Manal <moenoel@informatik.uni-bremen.de>
|
||||||
|
Date: Wed, 29 Nov 2017 15:28:51 +0100
|
||||||
|
Subject: [PATCH 08/12] fixed warnings in bootstrap.c
|
||||||
|
|
||||||
|
---
|
||||||
|
core/bootstrap.c | 11 +++++++----
|
||||||
|
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/core/bootstrap.c b/core/bootstrap.c
|
||||||
|
index 611566b..d0fc0c8 100644
|
||||||
|
--- a/core/bootstrap.c
|
||||||
|
+++ b/core/bootstrap.c
|
||||||
|
@@ -148,11 +148,11 @@ void bootstrap_step(lwm2m_context_t * contextP,
|
||||||
|
break;
|
||||||
|
|
||||||
|
case STATE_BS_HOLD_OFF:
|
||||||
|
- if (targetP->registration <= currentTime)
|
||||||
|
+ if (targetP->registration <= (time_t)currentTime)
|
||||||
|
{
|
||||||
|
prv_requestBootstrap(contextP, targetP);
|
||||||
|
}
|
||||||
|
- else if (*timeoutP > targetP->registration - currentTime)
|
||||||
|
+ else if (*timeoutP > targetP->registration - (time_t)currentTime)
|
||||||
|
{
|
||||||
|
*timeoutP = targetP->registration - currentTime;
|
||||||
|
}
|
||||||
|
@@ -163,12 +163,12 @@ void bootstrap_step(lwm2m_context_t * contextP,
|
||||||
|
break;
|
||||||
|
|
||||||
|
case STATE_BS_PENDING:
|
||||||
|
- if (targetP->registration <= currentTime)
|
||||||
|
+ if (targetP->registration <= (time_t)currentTime)
|
||||||
|
{
|
||||||
|
targetP->status = STATE_BS_FAILING;
|
||||||
|
*timeoutP = 0;
|
||||||
|
}
|
||||||
|
- else if (*timeoutP > targetP->registration - currentTime)
|
||||||
|
+ else if (*timeoutP > targetP->registration - (time_t)currentTime)
|
||||||
|
{
|
||||||
|
*timeoutP = targetP->registration - currentTime;
|
||||||
|
}
|
||||||
|
@@ -375,6 +375,7 @@ uint8_t bootstrap_handleCommand(lwm2m_context_t * contextP,
|
||||||
|
{
|
||||||
|
uint8_t result;
|
||||||
|
lwm2m_media_type_t format;
|
||||||
|
+ (void)response;
|
||||||
|
|
||||||
|
LOG_ARG("Code: %02X", message->code);
|
||||||
|
LOG_URI(uriP);
|
||||||
|
@@ -582,6 +583,8 @@ uint8_t bootstrap_handleRequest(lwm2m_context_t * contextP,
|
||||||
|
{
|
||||||
|
uint8_t result;
|
||||||
|
char * name;
|
||||||
|
+ (void)uriP;
|
||||||
|
+ (void)response;
|
||||||
|
|
||||||
|
LOG_URI(uriP);
|
||||||
|
if (contextP->bootstrapCallback == NULL) return COAP_500_INTERNAL_SERVER_ERROR;
|
||||||
|
--
|
||||||
|
2.1.4
|
||||||
|
|
||||||
@ -1,51 +0,0 @@
|
|||||||
From 7e378684d09226d699e566f30bd190acaab05e10 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Darredevil <alex.darredevil@gmail.com>
|
|
||||||
Date: Tue, 18 Aug 2015 11:46:44 +0100
|
|
||||||
Subject: [PATCH 2/4] fixed warnings in objects.c
|
|
||||||
|
|
||||||
---
|
|
||||||
core/objects.c | 8 ++++----
|
|
||||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/core/objects.c b/core/objects.c
|
|
||||||
index cb22444..95e093e 100644
|
|
||||||
--- a/core/objects.c
|
|
||||||
+++ b/core/objects.c
|
|
||||||
@@ -17,7 +17,7 @@
|
|
||||||
* Benjamin Cabé - Please refer to git log
|
|
||||||
* Bosch Software Innovations GmbH - Please refer to git log
|
|
||||||
* Pascal Rieux - Please refer to git log
|
|
||||||
- *
|
|
||||||
+ *
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -380,7 +380,7 @@ int prv_getRegisterPayload(lwm2m_context_t * contextP,
|
|
||||||
&& (contextP->altPath[0] != 0))
|
|
||||||
{
|
|
||||||
result = snprintf((char *)buffer, length, REG_ALT_PATH_LINK, contextP->altPath);
|
|
||||||
- if (result > 0 && result <= length)
|
|
||||||
+ if (result > 0 && (size_t)result <= length)
|
|
||||||
{
|
|
||||||
index = result;
|
|
||||||
}
|
|
||||||
@@ -398,7 +398,7 @@ int prv_getRegisterPayload(lwm2m_context_t * contextP,
|
|
||||||
result = snprintf((char *)buffer + index, length - index,
|
|
||||||
REG_OBJECT_PATH,
|
|
||||||
contextP->altPath?contextP->altPath:"", contextP->objectList[i]->objID);
|
|
||||||
- if (result > 0 && result <= length - index)
|
|
||||||
+ if (result > 0 && (size_t)result <= length - index)
|
|
||||||
{
|
|
||||||
index += result;
|
|
||||||
}
|
|
||||||
@@ -415,7 +415,7 @@ int prv_getRegisterPayload(lwm2m_context_t * contextP,
|
|
||||||
result = snprintf((char *)buffer + index, length - index,
|
|
||||||
REG_OBJECT_INSTANCE_PATH,
|
|
||||||
contextP->altPath?contextP->altPath:"", contextP->objectList[i]->objID, targetP->id);
|
|
||||||
- if (result > 0 && result <= length - index)
|
|
||||||
+ if (result > 0 && (size_t)result <= length - index)
|
|
||||||
{
|
|
||||||
index += result;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
1.9.1
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
From 913baf8fb537fc8a4d5d01b9ad96829df3a43ebe Mon Sep 17 00:00:00 2001
|
|
||||||
From: Darredevil <alex.darredevil@gmail.com>
|
|
||||||
Date: Tue, 18 Aug 2015 11:57:23 +0100
|
|
||||||
Subject: [PATCH 3/4] fixed errors in internals.h
|
|
||||||
|
|
||||||
---
|
|
||||||
core/internals.h | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/core/internals.h b/core/internals.h
|
|
||||||
index 36d7d12..d924481 100644
|
|
||||||
--- a/core/internals.h
|
|
||||||
+++ b/core/internals.h
|
|
||||||
@@ -16,7 +16,7 @@
|
|
||||||
* Toby Jaffey - Please refer to git log
|
|
||||||
* Bosch Software Innovations GmbH - Please refer to git log
|
|
||||||
* Pascal Rieux - Please refer to git log
|
|
||||||
- *
|
|
||||||
+ *
|
|
||||||
*******************************************************************************/
|
|
||||||
/*
|
|
||||||
Copyright (c) 2013, 2014 Intel Corporation
|
|
||||||
@@ -178,6 +178,7 @@ void reset_bootstrap_timer(lwm2m_context_t * context);
|
|
||||||
void update_bootstrap_state(lwm2m_context_t * contextP, uint32_t currentTime, time_t* timeoutP);
|
|
||||||
void delete_bootstrap_server_list(lwm2m_context_t * contextP);
|
|
||||||
uint8_t handle_bootstrap_request(lwm2m_context_t * contextP, lwm2m_uri_t * uriP, void * fromSessionH, coap_packet_t * message, coap_packet_t * response);
|
|
||||||
+coap_status_t handle_bootstrap_finish(lwm2m_context_t * context, void * fromSessionH);
|
|
||||||
|
|
||||||
// defined in liblwm2m.c
|
|
||||||
void delete_transaction_list(lwm2m_context_t * context);
|
|
||||||
--
|
|
||||||
1.9.1
|
|
||||||
42
pkg/wakaama/patches/0009-fixed-warnings-in-observe.c.patch
Normal file
42
pkg/wakaama/patches/0009-fixed-warnings-in-observe.c.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From 9c30634e5458827e8e398ca56a4f5294a61b1b92 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Manal <moenoel@informatik.uni-bremen.de>
|
||||||
|
Date: Wed, 29 Nov 2017 15:33:46 +0100
|
||||||
|
Subject: [PATCH 09/12] fixed warnings in observe.c
|
||||||
|
|
||||||
|
---
|
||||||
|
core/observe.c | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/core/observe.c b/core/observe.c
|
||||||
|
index 711c1d1..87c42b9 100644
|
||||||
|
--- a/core/observe.c
|
||||||
|
+++ b/core/observe.c
|
||||||
|
@@ -163,6 +163,7 @@ uint8_t observe_handleRequest(lwm2m_context_t * contextP,
|
||||||
|
{
|
||||||
|
lwm2m_watcher_t * watcherP;
|
||||||
|
uint32_t count;
|
||||||
|
+ (void)size;
|
||||||
|
|
||||||
|
LOG_ARG("Code: %02X, server status: %s", message->code, STR_STATUS(serverP->status));
|
||||||
|
LOG_URI(uriP);
|
||||||
|
@@ -649,7 +650,7 @@ void observe_step(lwm2m_context_t * contextP,
|
||||||
|
{
|
||||||
|
LOG_ARG("Checking minimal period (%d s)", watcherP->parameters->minPeriod);
|
||||||
|
|
||||||
|
- if (watcherP->lastTime + watcherP->parameters->minPeriod > currentTime)
|
||||||
|
+ if (watcherP->lastTime + (time_t)watcherP->parameters->minPeriod > currentTime)
|
||||||
|
{
|
||||||
|
// Minimum Period did not elapse yet
|
||||||
|
interval = watcherP->lastTime + watcherP->parameters->minPeriod - currentTime;
|
||||||
|
@@ -671,7 +672,7 @@ void observe_step(lwm2m_context_t * contextP,
|
||||||
|
{
|
||||||
|
LOG_ARG("Checking maximal period (%d s)", watcherP->parameters->maxPeriod);
|
||||||
|
|
||||||
|
- if (watcherP->lastTime + watcherP->parameters->maxPeriod <= currentTime)
|
||||||
|
+ if (watcherP->lastTime + (time_t)watcherP->parameters->maxPeriod <= currentTime)
|
||||||
|
{
|
||||||
|
LOG("Notify on maximal period");
|
||||||
|
notify = true;
|
||||||
|
--
|
||||||
|
2.1.4
|
||||||
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
From 13a55d7a07fbfb4af77d51825633bd5e30661023 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Darredevil <alex.darredevil@gmail.com>
|
|
||||||
Date: Tue, 18 Aug 2015 12:00:23 +0100
|
|
||||||
Subject: [PATCH 4/4] fixed warnings in registration.c
|
|
||||||
|
|
||||||
---
|
|
||||||
core/registration.c | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/core/registration.c b/core/registration.c
|
|
||||||
index 2ec7295..abdad48 100644
|
|
||||||
--- a/core/registration.c
|
|
||||||
+++ b/core/registration.c
|
|
||||||
@@ -389,6 +389,7 @@ void registration_update(lwm2m_context_t * contextP,
|
|
||||||
static void prv_handleDeregistrationReply(lwm2m_transaction_t * transacP,
|
|
||||||
void * message)
|
|
||||||
{
|
|
||||||
+ (void)message;
|
|
||||||
lwm2m_server_t * targetP;
|
|
||||||
|
|
||||||
targetP = (lwm2m_server_t *)(transacP->peerP);
|
|
||||||
@@ -529,7 +530,7 @@ static int prv_getId(uint8_t * data,
|
|
||||||
{
|
|
||||||
data++;
|
|
||||||
length-=2;
|
|
||||||
- }
|
|
||||||
+ }
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
--
|
|
||||||
1.9.1
|
|
||||||
42
pkg/wakaama/patches/0010-fixed-warnings-registration.c.patch
Normal file
42
pkg/wakaama/patches/0010-fixed-warnings-registration.c.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From ddbb2dc1078489131c77084934099c8a76c80fb7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Manal <moenoel@informatik.uni-bremen.de>
|
||||||
|
Date: Wed, 29 Nov 2017 16:04:41 +0100
|
||||||
|
Subject: [PATCH 10/12] fixed warnings registration.c
|
||||||
|
|
||||||
|
---
|
||||||
|
core/registration.c | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/core/registration.c b/core/registration.c
|
||||||
|
index a2fca3f..647a980 100644
|
||||||
|
--- a/core/registration.c
|
||||||
|
+++ b/core/registration.c
|
||||||
|
@@ -69,7 +69,7 @@ static int prv_getRegistrationQueryLength(lwm2m_context_t * contextP,
|
||||||
|
{
|
||||||
|
int index;
|
||||||
|
int res;
|
||||||
|
- char buffer[21];
|
||||||
|
+ uint8_t buffer[21];
|
||||||
|
|
||||||
|
index = strlen(QUERY_STARTER QUERY_VERSION_FULL QUERY_DELIMITER QUERY_NAME);
|
||||||
|
index += strlen(contextP->endpointName);
|
||||||
|
@@ -170,7 +170,7 @@ static int prv_getRegistrationQuery(lwm2m_context_t * contextP,
|
||||||
|
res = utils_stringCopy(buffer + index, length - index, QUERY_DELIMITER QUERY_LIFETIME);
|
||||||
|
if (res < 0) return 0;
|
||||||
|
index += res;
|
||||||
|
- res = utils_intToText(server->lifetime, buffer + index, length - index);
|
||||||
|
+ res = utils_intToText(server->lifetime, (uint8_t *)(buffer + index), length - index);
|
||||||
|
if (res == 0) return 0;
|
||||||
|
index += res;
|
||||||
|
}
|
||||||
|
@@ -535,6 +535,7 @@ static void prv_handleDeregistrationReply(lwm2m_transaction_t * transacP,
|
||||||
|
void * message)
|
||||||
|
{
|
||||||
|
lwm2m_server_t * targetP;
|
||||||
|
+ (void)message;
|
||||||
|
|
||||||
|
targetP = (lwm2m_server_t *)(transacP->userData);
|
||||||
|
if (NULL != targetP)
|
||||||
|
--
|
||||||
|
2.1.4
|
||||||
|
|
||||||
25
pkg/wakaama/patches/0011-fixed-warnings-in-objects.c.patch
Normal file
25
pkg/wakaama/patches/0011-fixed-warnings-in-objects.c.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From e3242ed0be22664d0c34f9fb5a1f363df24701f9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Manal <moenoel@informatik.uni-bremen.de>
|
||||||
|
Date: Wed, 29 Nov 2017 16:31:40 +0100
|
||||||
|
Subject: [PATCH 11/12] fixed warnings in objects.c
|
||||||
|
|
||||||
|
---
|
||||||
|
core/objects.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/core/objects.c b/core/objects.c
|
||||||
|
index f9b8962..e5a0edc 100644
|
||||||
|
--- a/core/objects.c
|
||||||
|
+++ b/core/objects.c
|
||||||
|
@@ -528,7 +528,7 @@ int object_getRegisterPayloadBufferLength(lwm2m_context_t * contextP)
|
||||||
|
size_t index;
|
||||||
|
int result;
|
||||||
|
lwm2m_object_t * objectP;
|
||||||
|
- char buffer[REG_OBJECT_MIN_LEN + 5];
|
||||||
|
+ uint8_t buffer[REG_OBJECT_MIN_LEN + 5];
|
||||||
|
|
||||||
|
LOG("Entering");
|
||||||
|
index = strlen(REG_START);
|
||||||
|
--
|
||||||
|
2.1.4
|
||||||
|
|
||||||
26
pkg/wakaama/patches/0012-fixed-warnings-in-liblwm2m.c.patch
Normal file
26
pkg/wakaama/patches/0012-fixed-warnings-in-liblwm2m.c.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 8a20d72f1cb54151995cb30f3650267f896e88d0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Manal <moenoel@informatik.uni-bremen.de>
|
||||||
|
Date: Wed, 29 Nov 2017 16:54:47 +0100
|
||||||
|
Subject: [PATCH 12/12] fixed warnings in liblwm2m.c
|
||||||
|
|
||||||
|
---
|
||||||
|
core/liblwm2m.c | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/core/liblwm2m.c b/core/liblwm2m.c
|
||||||
|
index bf4b1b1..b7aafd7 100644
|
||||||
|
--- a/core/liblwm2m.c
|
||||||
|
+++ b/core/liblwm2m.c
|
||||||
|
@@ -365,7 +365,9 @@ int lwm2m_step(lwm2m_context_t * contextP,
|
||||||
|
time_t * timeoutP)
|
||||||
|
{
|
||||||
|
time_t tv_sec;
|
||||||
|
+#ifdef LWM2M_CLIENT_MODE
|
||||||
|
int result;
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
LOG_ARG("timeoutP: %" PRId64, *timeoutP);
|
||||||
|
tv_sec = lwm2m_gettime();
|
||||||
|
--
|
||||||
|
2.1.4
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user