From c0e6a61b4c08b2a03818b855936c3a806da795a1 Mon Sep 17 00:00:00 2001 From: Joseph Morrow Date: Fri, 12 Sep 2014 13:17:46 -0400 Subject: [PATCH] Patch 1: Arduino pdu malloc fix. Patch 2: Rebase Patch 3: Changed implementation of fix to simply change size of COAP_MAX_PDU_SIZE to 320 for Arduino only. This will stay the same going forth, but there is an uncaught case that can only be fixed in the next sprint(as there is not enough time)-- We must implement blockwise transfer so that a PDU larger than 320 is properly handled (i.e. broken up into chunks of 320 or smaller). A Rally task has already been created for Sprint 8 for this. Patch 4: Meant to use "else" instead of "elif". Change-Id: I4df20d28c821f6fc2c98a6bf3672331264978be5 --- csdk/libcoap-4.1.1/pdu.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/csdk/libcoap-4.1.1/pdu.h b/csdk/libcoap-4.1.1/pdu.h index 058dac8..b6039a6 100644 --- a/csdk/libcoap-4.1.1/pdu.h +++ b/csdk/libcoap-4.1.1/pdu.h @@ -30,7 +30,11 @@ extern "C" { #define COAP_DEFAULT_PORT 5683 /* CoAP default UDP port */ #define COAP_DEFAULT_MAX_AGE 60 /* default maximum object lifetime in seconds */ #ifndef COAP_MAX_PDU_SIZE -#define COAP_MAX_PDU_SIZE 1400 /* maximum size of a CoAP PDU */ +#ifdef WITH_ARDUINO +#define COAP_MAX_PDU_SIZE 320 /* maximum size of a CoAP PDU for embedded platforms*/ +#else +#define COAP_MAX_PDU_SIZE 1400 /* maximum size of a CoAP PDU for big platforms*/ +#endif #endif /* COAP_MAX_PDU_SIZE */ #define COAP_DEFAULT_VERSION 1 /* version of CoAP supported */ -- 2.7.4