Commit graph

19 commits

Author SHA1 Message Date
Niclas Finne d764e09f35 Make sure the url is null terminated in CoAP observe. 2015-09-24 22:51:30 +02:00
Niclas Finne 7edf6e60e9 Changed to use process API to switch process context in CoAP 2015-09-24 22:51:30 +02:00
Joakim Eriksson 2351ee078a Fixed CoAP format to be a uint16_t since the enum might compile to 8 bit and cause problems if 16-bit format types are used 2015-09-24 22:51:30 +02:00
Joakim Eriksson 1b0cdee9ec Fixed observe to handle subresources and to always create a fake request for notify GETs 2015-09-24 22:51:30 +02:00
Joakim Eriksson fe6d8685ac Fixed support for NULL attributes of resources 2015-09-11 00:52:45 +02:00
Joakim Eriksson 1e0b5292d7 Loop-unroll in CoAP for fixing some potential bugs on some platforms
where size_t is not the same as unsigned int.
2015-09-11 00:52:45 +02:00
Simon Duquennoy 63ddba93a9 Merge pull request #1169 from feshie/pr-warnings-fix
Fix multiple warnings (TCPIP, coap-observe, msp430, z1/tmp102, ContikiMAC)
2015-09-08 09:05:44 +02:00
Arthur Fabre 158087db62 Fix warning in coap-observe
../..//apps/er-coap/er-coap-observe.c:237:15: warning: unused variable
‘content’ [-Wunused-variable]
This was caused by a buffer that was declared, but used only in
commented out code.
The variable was moved to the commented out block.
The block was surrounded by an #if 0 ... #endif to make it easier to
uncomment.
Everything still compiles with the code in question uncommented.
2015-09-07 17:51:27 +01:00
Arthur Fabre 5403b2a211 Fix default CoAP header block2 size
When a client sends a CoAP request with no block2 size,
the default one would be set to REST_MAX_CHUNK_SIZE.
However, this is not guaranteed to be a power of 2.
This can lead to clients receiving a bigger payload than expected as
part of the header, and ending up with duplicated content.
Setting the default to COAP_MAX_BLOCK_SIZE,
which is guaranteed to be a power of 2, fixes this.
2015-07-29 16:37:09 +01:00
Moritz 'Morty' Strübe 0dab6926b3 Move MAX, MIN and ABS to sys/cc.h 2015-05-18 08:53:17 +02:00
Daniele Alessandrelli 799e9350a0 er-coap: add client-side support for CoAP Observe
Client-side support for CoAP observe is not compiled by default. To enable it, the COAP_OBSERVE_CLIENT macro must be defined equal to 1.
2015-02-24 22:46:48 +01:00
Simon Duquennoy a9cc909794 Network layer configuration: replace UIP_CONF_* with NETSTACK_CONF_WITH_* 2014-12-01 21:02:57 +01:00
Daniele Alessandrelli 21898f1e21 er-coap (observe): fix possible duplicate value for observe option in GET response and subsequent notification
Currently, the observe value for a response to a GET observe request is always set to zero. That may cause the subsequent notification to have the same observe value. In fact, that happens every time an observable resource is observed for the first time (since the obs_counter is implicitly initialized to zero).
This patch fixes such a problem by setting the observe option value of responses to obs_counter (and then incrementing it).
2014-08-24 19:07:36 +02:00
Matthias Kovatsch 969d512546 Removed references to missing DTLS implementation. 2014-05-15 20:29:05 +02:00
Matthias Kovatsch ee493dd6af Update to observe-13 (cancellation). 2014-05-15 20:29:05 +02:00
Lars Schmertmann 351ba413e2 Enabled forcing CON packet for observer notifications each 20 packets 2014-05-15 20:29:04 +02:00
Lars Schmertmann 386d708b56 Added function for easy block1 usage.
Fixed blocksize calculation when REST_MAX_CHUNK_SIZE != 2^x.
Added example for block1 + separate + block2.
2014-05-15 20:29:04 +02:00
Lars Schmertmann bb737f85ae Used Uncrustify and fixed Travis build errors. 2014-05-15 20:29:04 +02:00
Matthias Kovatsch 3dd5bd7a37 Renamed erbium to er-coap to avoid confusion and have a meaningful directory name. 2014-05-15 20:29:03 +02:00