Browse Source

Merge pull request #6785 from patgrosse/microcoap_update

pkg: microcoap: bump version (ef27289, Feb 5 2016)
master
Kaspar Schleiser 5 years ago committed by GitHub
parent
commit
2a46cd6d58
  1. 2
      pkg/microcoap/Makefile
  2. 32
      pkg/microcoap/patches/0001-Remove-unneeded-.c-files.patch
  3. 19
      pkg/microcoap/patches/0002-Add-RIOT-Makefile.patch
  4. 16
      pkg/microcoap/patches/0003-change-flag-from-DEBUG-to-MICROCOAP_DEBUG.patch
  5. 19
      pkg/microcoap/patches/0004-Increment-MAX_SEGMENTS.patch
  6. 17
      pkg/microcoap/patches/0005-fix-uninitialized-variable.patch
  7. 39
      pkg/microcoap/patches/0006-Removed-unnecessary-library.json.patch

2
pkg/microcoap/Makefile

@ -1,6 +1,6 @@
PKG_NAME=microcoap
PKG_URL=https://github.com/1248/microcoap.git
PKG_VERSION=9cb1dcda2182a8dca8483b230cda8b591a924c82
PKG_VERSION=ef272895925f0d4c563725fe0102966f544a0fdc
PKG_LICENSE=MIT
.PHONY: all

32
pkg/microcoap/patches/0001-Remove-unneeded-.c-files.patch

@ -1,13 +1,13 @@
From 8976fda8df092ce24e1c6bbf718f94cb98009231 Mon Sep 17 00:00:00 2001
From: Martine Lenders <mail@martine-lenders.eu>
Date: Sun, 1 Feb 2015 16:35:56 +0100
Subject: [PATCH 1/2] Remove unneeded *.c files
From 335f83548f4a4a13b556800bcc354d77db8c3434 Mon Sep 17 00:00:00 2001
From: Patrick Grosse <patrick.grosse@uni-muenster.de>
Date: Sat, 25 Mar 2017 10:32:27 +0100
Subject: [PATCH 1/6] Remove unneeded *.c files
---
endpoints.c | 113 ----------------------------------------------------------
main-posix.c | 71 ------------------------------------
main-posix.c | 85 -------------------------------------------
microcoap.ino | 99 --------------------------------------------------
3 files changed, 283 deletions(-)
3 files changed, 297 deletions(-)
delete mode 100644 endpoints.c
delete mode 100644 main-posix.c
delete mode 100644 microcoap.ino
@ -133,10 +133,10 @@ index ccc961b..0000000
-
diff --git a/main-posix.c b/main-posix.c
deleted file mode 100644
index dd73cf9..0000000
index 3711b02..0000000
--- a/main-posix.c
+++ /dev/null
@@ -1,71 +0,0 @@
@@ -1,85 +0,0 @@
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <stdio.h>
@ -150,17 +150,31 @@ index dd73cf9..0000000
-int main(int argc, char **argv)
-{
- int fd;
-#ifdef IPV6
- struct sockaddr_in6 servaddr, cliaddr;
-#else /* IPV6 */
- struct sockaddr_in servaddr, cliaddr;
-#endif /* IPV6 */
- uint8_t buf[4096];
- uint8_t scratch_raw[4096];
- coap_rw_buffer_t scratch_buf = {scratch_raw, sizeof(scratch_raw)};
-
-#ifdef IPV6
- fd = socket(AF_INET6,SOCK_DGRAM,0);
-#else /* IPV6 */
- fd = socket(AF_INET,SOCK_DGRAM,0);
-#endif /* IPV6 */
-
- bzero(&servaddr,sizeof(servaddr));
-#ifdef IPV6
- servaddr.sin6_family = AF_INET6;
- servaddr.sin6_addr = in6addr_any;
- servaddr.sin6_port = htons(PORT);
-#else /* IPV6 */
- servaddr.sin_family = AF_INET;
- servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
- servaddr.sin_port = htons(PORT);
-#endif /* IPV6 */
- bind(fd,(struct sockaddr *)&servaddr, sizeof(servaddr));
-
- endpoint_setup();
@ -314,5 +328,5 @@ index 148b6ce..0000000
-}
-
--
1.9.1
2.7.4

19
pkg/microcoap/patches/0002-Add-RIOT-Makefile.patch

@ -1,18 +1,19 @@
From 007576627163a35881ebdf50701f94b73aa7aae7 Mon Sep 17 00:00:00 2001
From: Martine Lenders <mail@martine-lenders.eu>
Date: Sun, 1 Feb 2015 16:40:35 +0100
Subject: [PATCH 2/2] Add RIOT Makefile
From 021e6371d6915126cf0e9cf7556b9b4a6f3ae14f Mon Sep 17 00:00:00 2001
From: Patrick Grosse <patrick.grosse@uni-muenster.de>
Date: Sat, 25 Mar 2017 10:33:22 +0100
Subject: [PATCH 2/6] Add RIOT Makefile
---
Makefile | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)
Makefile | 23 +----------------------
1 file changed, 1 insertion(+), 22 deletions(-)
diff --git a/Makefile b/Makefile
index bb3c5fc..48422e9 100644
index 19175d2..48422e9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1 @@
@@ -1,22 +1 @@
-CFLAGS += -Wall -DDEBUG
-# -DIPV6
-SRC = $(wildcard *.c)
-OBJ = $(SRC:%.c=%.o)
-DEPS = $(SRC:%.c=%.d)
@ -35,5 +36,5 @@ index bb3c5fc..48422e9 100644
- @$(RM) $(EXEC) $(OBJ) $(DEPS)
+include $(RIOTBASE)/Makefile.base
--
1.9.1
2.7.4

16
pkg/microcoap/patches/0003-change-flag-from-DEBUG-to-MICROCOAP_DEBUG.patch

@ -1,7 +1,7 @@
From a90622ce42cd1a816fab4d8f6829426bfc8683b2 Mon Sep 17 00:00:00 2001
From: Lotte Steenbrink <lotte.steenbrink@fu-berlin.de>
Date: Sun, 8 Feb 2015 15:00:01 -0800
Subject: [PATCH] change flag from DEBUG to MICROCOAP_DEBUG
From 265f4bb3d661b32fb3ec58712c48982bab433a52 Mon Sep 17 00:00:00 2001
From: Patrick Grosse <patrick.grosse@uni-muenster.de>
Date: Sat, 25 Mar 2017 10:35:03 +0100
Subject: [PATCH 3/6] change flag from DEBUG to MICROCOAP_DEBUG
---
coap.c | 8 ++++----
@ -9,7 +9,7 @@ Subject: [PATCH] change flag from DEBUG to MICROCOAP_DEBUG
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/coap.c b/coap.c
index 4f30e3a..ada66c2 100644
index 4d036f5..407d1d2 100644
--- a/coap.c
+++ b/coap.c
@@ -9,7 +9,7 @@
@ -49,10 +49,10 @@ index 4f30e3a..ada66c2 100644
{
coap_dumpHeader(&pkt->hdr);
diff --git a/coap.h b/coap.h
index c132334..4a7adc5 100644
index c67c7ce..8c91369 100644
--- a/coap.h
+++ b/coap.h
@@ -145,12 +145,22 @@ typedef struct
@@ -158,12 +158,22 @@ typedef struct
///////////////////////
@ -77,5 +77,5 @@ index c132334..4a7adc5 100644
int coap_handle_req(coap_rw_buffer_t *scratch, const coap_packet_t *inpkt, coap_packet_t *outpkt);
void coap_option_nibble(uint32_t value, uint8_t *nibble);
--
1.8.3.2
2.7.4

19
pkg/microcoap/patches/0004-increment_max_segments.patch → pkg/microcoap/patches/0004-Increment-MAX_SEGMENTS.patch

@ -1,19 +1,19 @@
From a9ac5cc1f075b8d42cff1dc4b8f4967c755e2303 Mon Sep 17 00:00:00 2001
From: Lotte Steenbrink <lotte.steenbrink@fu-berlin.de>
Date: Tue, 31 Mar 2015 05:54:31 +0200
Subject: [PATCH] Increment MAX_SEGMENTS
From e78af387a5c0972cba16766541e5e659b0e08eaf Mon Sep 17 00:00:00 2001
From: Patrick Grosse <patrick.grosse@uni-muenster.de>
Date: Sat, 25 Mar 2017 10:35:39 +0100
Subject: [PATCH 4/6] Increment MAX_SEGMENTS
---
coap.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/coap.h b/coap.h
index 9090285..7bea5f1 100644
index 8c91369..5d79e4e 100644
--- a/coap.h
+++ b/coap.h
@@ -131,7 +131,12 @@ typedef enum
@@ -135,7 +135,12 @@ typedef enum
///////////////////////
typedef int (*coap_endpoint_func)(coap_rw_buffer_t *scratch, const coap_packet_t *inpkt, coap_packet_t *outpkt, uint8_t id_hi, uint8_t id_lo);
+/* To increase COAP_MAX_SEGMENTS, set CFLAGS to -DCOAP_MAX_SEGMENTS=<your value>. */
+#ifndef COAP_MAX_SEGMENTS
@ -24,5 +24,6 @@ index 9090285..7bea5f1 100644
typedef struct
{
int count;
--
2.1.0
--
2.7.4

17
pkg/microcoap/patches/0005-fix-uninitialized-variable.patch

@ -1,19 +1,14 @@
From ac2d404d32d96a50a779ded7ad007f15bcf2b4b0 Mon Sep 17 00:00:00 2001
From: Kaspar Schleiser <kaspar@schleiser.de>
Date: Mon, 30 Nov 2015 02:11:12 +0100
Subject: [PATCH] fix uninitialized variable
From 3d467db74c39df3f79cacfe661fb29d413e2db38 Mon Sep 17 00:00:00 2001
From: Patrick Grosse <patrick.grosse@uni-muenster.de>
Date: Sat, 25 Mar 2017 10:36:09 +0100
Subject: [PATCH 5/6] fix uninitialized variable
coap.c: In function 'coap_build':
coap.c:298:17: error: 'len' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
uint8_t len, delta = 0;
^
---
coap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/coap.c b/coap.c
index ada66c2..b6b05af 100644
index 407d1d2..5006b59 100644
--- a/coap.c
+++ b/coap.c
@@ -295,7 +295,7 @@ int coap_build(uint8_t *buf, size_t *buflen, const coap_packet_t *pkt)
@ -26,5 +21,5 @@ index ada66c2..b6b05af 100644
if (((size_t)(p-buf)) > *buflen)
return COAP_ERR_BUFFER_TOO_SMALL;
--
2.6.2
2.7.4

39
pkg/microcoap/patches/0006-Removed-unnecessary-library.json.patch

@ -0,0 +1,39 @@
From 83a5433b23b7c801067ac1dbccb6c1f6d0f78599 Mon Sep 17 00:00:00 2001
From: Patrick Grosse <patrick.grosse@uni-muenster.de>
Date: Thu, 30 Mar 2017 13:08:05 +0200
Subject: [PATCH 6/6] Removed unnecessary library.json
---
library.json | 20 --------------------
1 file changed, 20 deletions(-)
delete mode 100644 library.json
diff --git a/library.json b/library.json
deleted file mode 100644
index 570161c..0000000
--- a/library.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "microcoap",
- "keywords": "coap, web",
- "description": "A small CoAP implementation for microcontrollers",
- "repository": {
- "type": "git",
- "url": "https://github.com/1248/microcoap.git"
- },
- "authors": {
- "name": "Toby Jaffey",
- "url": "http://twitter.com/tobyjaffey"
- },
- "exclude": [
- "main-posix.c",
- "microcoap.ino"
- ],
- "examples": "microcoap.ino",
- "frameworks": "arduino",
- "platforms": "*"
-}
--
2.7.4
Loading…
Cancel
Save