Skip to content

Commit

Permalink
Merge pull request #8148 from moenoel/update-wakaama
Browse files Browse the repository at this point in the history
pkg: wakaama: Fix and update wakaama package to version fe48d45
  • Loading branch information
miri64 committed Nov 30, 2017
2 parents 38880ac + bc62f54 commit 70d2991
Show file tree
Hide file tree
Showing 20 changed files with 351 additions and 342 deletions.
4 changes: 2 additions & 2 deletions pkg/wakaama/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PKG_NAME=wakaama
PKG_URL=https://github.com/eclipse/wakaama.git
PKG_VERSION=69a32cfae39f66fe4eec4cc8d1cd48ced7ad447c
PKG_VERSION=ee80c224622684ee47c17c57918904cffd00c4d2
PKG_LICENSE=EDL-1.0,EPL-1.0

.PHONY: all
Expand All @@ -11,7 +11,7 @@ all: patch
patch: git-download
mkdir -p "$(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 'include $$(RIOTBASE)/Makefile.base' >> $(PKG_BUILDDIR)/riotbuild/Makefile
Expand Down
25 changes: 25 additions & 0 deletions pkg/wakaama/patches/0001-change-header-location.patch
Original file line number Diff line number Diff line change
@@ -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

24 changes: 0 additions & 24 deletions pkg/wakaama/patches/0001-changing-header-location.patch

This file was deleted.

29 changes: 29 additions & 0 deletions pkg/wakaama/patches/0002-define-endianness.patch
Original file line number Diff line number Diff line change
@@ -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

28 changes: 0 additions & 28 deletions pkg/wakaama/patches/0002-defined-endianness.patch

This file was deleted.

70 changes: 13 additions & 57 deletions pkg/wakaama/patches/0003-fixed-warnings-in-er-coap-13.c.patch
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
From a20abf688bb2543f1bdf3e05d237092421408f2e Mon Sep 17 00:00:00 2001
From: Darredevil <alex.darredevil@gmail.com>
Date: Thu, 13 Aug 2015 12:36:31 +0100
Subject: [PATCH 3/6] fixed warnings in er-coap-13.c
From cb33c63fad39a27b7164965f7ba3649852ab5104 Mon Sep 17 00:00:00 2001
From: Christian Manal <moenoel@informatik.uni-bremen.de>
Date: Thu, 23 Nov 2017 11:08:53 +0100
Subject: [PATCH 03/12] fixed warnings in er-coap-13.c

---
core/er-coap-13/er-coap-13.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
core/er-coap-13/er-coap-13.c | 5 ++++-
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
index cef62cc..0df7e4f 100644
index 67d1bb3..647bb88 100644
--- a/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
-coap_get_mid()
+coap_get_mid(void)
{
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);
}
*/
Expand All @@ -29,51 +29,7 @@ index cef62cc..0df7e4f 100644
+ (void)output;
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
27 changes: 14 additions & 13 deletions pkg/wakaama/patches/0004-fixed-warnings-in-packet.c.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From dd5fd3021b0473c0bd6278fe574acbb8a9aa3504 Mon Sep 17 00:00:00 2001
From: Darredevil <alex.darredevil@gmail.com>
Date: Thu, 13 Aug 2015 12:43:09 +0100
Subject: [PATCH 4/6] fixed warnings in packet.c
From b3195957e4fa9217f71f3d5f4505aa463516abed Mon Sep 17 00:00:00 2001
From: Christian Manal <moenoel@informatik.uni-bremen.de>
Date: Thu, 23 Nov 2017 11:11:17 +0100
Subject: [PATCH 04/12] fixed warnings in packet.c

---
core/packet.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/core/packet.c b/core/packet.c
index 76715ff..886d17b 100644
index dc998d3..5e9d9c1 100644
--- a/core/packet.c
+++ b/core/packet.c
@@ -97,6 +97,9 @@ static void handle_reset(lwm2m_context_t * contextP,
Expand All @@ -19,16 +19,17 @@ index 76715ff..886d17b 100644
+ (void)fromSessionH;
+ (void)message;
#ifdef LWM2M_CLIENT_MODE
cancel_observe(contextP, message->mid, fromSessionH);
#endif
@@ -107,6 +110,8 @@ static coap_status_t handle_request(lwm2m_context_t * contextP,
coap_packet_t * message,
coap_packet_t * response)
LOG("Entering");
observe_cancel(contextP, message->mid, fromSessionH);
@@ -108,6 +111,8 @@ static uint8_t handle_request(lwm2m_context_t * contextP,
coap_packet_t * message,
coap_packet_t * response)
{
+ (void)contextP;
+ (void)fromSessionH;
lwm2m_uri_t * uriP;
coap_status_t result = NOT_FOUND_4_04;
uint8_t result = COAP_IGNORE;

--
2.1.4

--
1.9.1
26 changes: 26 additions & 0 deletions pkg/wakaama/patches/0005-fixed-warnings-in-registration.c.patch
Original file line number Diff line number Diff line change
@@ -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

50 changes: 0 additions & 50 deletions pkg/wakaama/patches/0005-fixed-warnings-in-tlv.c.patch

This file was deleted.

40 changes: 20 additions & 20 deletions pkg/wakaama/patches/0006-fixed-warnings-in-utils.c.patch
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
From 2f8c7bd7eabd55f2f4dd0da5e2a252b95f0e51c9 Mon Sep 17 00:00:00 2001
From: Darredevil <alex.darredevil@gmail.com>
Date: Thu, 13 Aug 2015 13:03:42 +0100
Subject: [PATCH 6/6] fixed warnings in utils.c
From 91e610adbf53342088242e7bc6a207fc4b48a715 Mon Sep 17 00:00:00 2001
From: Christian Manal <moenoel@informatik.uni-bremen.de>
Date: Thu, 23 Nov 2017 11:35:06 +0100
Subject: [PATCH 06/12] fixed warnings in utils.c

---
core/utils.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
core/utils.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/core/utils.c b/core/utils.c
index f62e932..c07ef4b 100644
index 715dec9..a06d1f6 100644
--- a/core/utils.c
+++ b/core/utils.c
@@ -13,7 +13,7 @@
* Contributors:
* David Navarro, Intel Corporation - initial API and implementation
* Toby Jaffey - Please refer to git log
- *
+ *
*******************************************************************************/

/*
@@ -357,6 +357,8 @@ lwm2m_server_t * prv_findServer(lwm2m_context_t * contextP,
@@ -52,7 +52,6 @@
#include <stdio.h>
#include <float.h>

-
int utils_textToInt(uint8_t * buffer,
int length,
int64_t * dataP)
@@ -376,6 +375,8 @@ lwm2m_server_t * utils_findServer(lwm2m_context_t * contextP,
lwm2m_server_t * utils_findBootstrapServer(lwm2m_context_t * contextP,
void * fromSessionH)
{
+ (void)contextP;
+ (void)fromSessionH;
#ifdef LWM2M_CLIENT_MODE

lwm2m_server_t * targetP;
--
1.9.1
--
2.1.4

Loading

0 comments on commit 70d2991

Please sign in to comment.