Commit Graph
82 Commits
Author SHA1 Message Date
Olaf Bergmann 095e2ee629 bugfix: #17 coap_opt_size underestimates space usage
Fixed calculation of option size in coap_new_error_response(). As
only some options are copied from the request, the delta value can
increase and thus require more space to encode. This fix closes
https://sourceforge.net/p/libcoap/bugs/17/ (thanks to chrysn and
tbahls for pointing this out).
2013-09-03 14:19:59 +02:00
Olaf Bergmann accc094785 notifications and observer removal according to draft-ietf-core-observe-09 2013-07-23 17:33:03 +02:00
Olaf Bergmann 5318781565 option codes updated according to coap-18 2013-07-04 18:45:45 +02:00
Olaf Bergmann c007638c1a fixed bug in size-calculation of coap_new_error_response() (applied patch from Thomas Stammeier)
The calculation of required space for textual error phrase did not take into account the one
byte for the payload start marker.
2013-02-04 11:01:13 +01:00
Olaf Bergmann 81ee38611d applied patch from chrysn to fix bug in .well-known/core generation (missing 2 bytes) 2013-02-01 13:58:11 +01:00
Olaf Bergmann b186bfe22d bugfix 2013-01-18 17:40:39 +01:00
Olaf Bergmann 54ef9fd83c Klaus-encoding and option iterators 2013-01-18 16:44:19 +01:00
Olaf Bergmann f48ecd9f2d replaced CoAP option Token by new encoding 2013-01-11 17:44:49 +01:00
Olaf Bergmann cd10925056 modified option parser 2013-01-11 11:32:22 +01:00
Olaf Bergmann c6412f2038 Rework of option parser to support "Klaus encoding" (coap-13), unit tests
The subdirectory "tests" now contains a growing set of unit tests for the
libcoap API. To use this, you will need CUnit (see http://cunit.sourceforge.net)
and must configure with the option --with-tests.
2013-01-07 17:37:49 +01:00
Olaf Bergmann ae4cb93619 debug code cleanup 2012-11-20 13:02:59 +01:00
Olaf Bergmann 624159aa7c bugfix 2012-11-20 12:55:57 +01:00
Olaf Bergmann 8bfc00481a coap-12: option type numbers, option jumps and length coding 2012-11-20 12:24:15 +01:00
Olaf Bergmann d7af1a6223 parse header in a more portable way 2012-10-23 23:08:37 +02:00
Thomas Pötsch 45b76ec304 fixed memory leak in coap_free_context() exhibited in example server 2012-09-19 16:17:18 +02:00
Olaf Bergmann 70300f82b1 fixed off-by-one error in net.c - ID: 3542515 (applied patch from John Sucaet) 2012-07-11 13:19:12 +02:00
Olaf Bergmann e3c81ec1b6 partially fixed bug invalid reads in option.c - ID: 3538692
applied patch provided by John Sucaet
small fix in coap_read() to avoid potential crashes
2012-07-05 16:56:40 +02:00
Olaf Bergmann 25e6806798 fixed inconsistency when sendto returns an error - ID: 3538391 (patch by John Sucaet) 2012-06-29 11:12:33 +02:00
Olaf Bergmann 28a6d45cde fixed bug #3524612 (Double free error when coap_send returns COAP_INVALID_TID)
From jsucaet's error description (Credits to Marc Haesen for revealing this bug):
The intent of the current code of coap_send is to release the allocated
memory upon success and not to release when an error has occured. However
this is broken (returning from coap_send with an error and a deallocated
pdu ptr is possible).
In the patch, I propose to let the calling function (of coap_send) be
responsible for free'ing the allocated pointer.
2012-05-29 19:41:22 +02:00
Olaf Bergmann 7aa393ff65 bugfix (Thanks to John Sucaet) 2012-04-18 12:29:41 +02:00
Olaf Bergmann c98a084626 configure options to throw out block, observe, and query-filter 2012-04-18 12:11:41 +02:00
Olaf Bergmann d80bf8ff24 bugfix (thanks to Pierre Caillot) 2012-04-05 15:11:02 +02:00
Olaf Bergmann dfa4f32681 bugfix: sanity check on incoming message 2012-03-25 17:05:02 +02:00
Olaf Bergmann 44ea7c58ba attribute filters for /.well-known/core 2012-03-21 16:40:59 +01:00
Olaf Bergmann 582e59f107 handling of long option lists 2012-03-20 18:47:46 +01:00
Olaf Bergmann ceb3ff90e2 more fixes for Contiki 2012-03-08 18:15:33 +01:00
Olaf Bergmann fbdfa9e4b5 bugfix
Do not acknowledge responses to NON-confirmable requests, instead response
is NON-confirmable as well.
2012-03-07 21:47:38 +01:00
Olaf Bergmann 12f4b37322 network address functions for non-contiki platforms 2012-03-07 20:15:00 +01:00
Olaf Bergmann f5f60f6edd suppress responses for multicast requests (testing) 2012-01-23 00:42:15 +01:00
Olaf Bergmann a335f87847 bugfix 2012-01-20 18:04:08 +01:00
Olaf Bergmann 29ce30fa32 store local address to check if message was received via multicast 2012-01-20 16:12:29 +01:00
Olaf Bergmann 68167b10d0 response handlers must acknowledge confirmable messages themselves
This way, the application can decide for a separate response whether it
should be acknowledged or reset.
2012-01-20 15:04:48 +01:00
Olaf Bergmann f8f3f64af0 less debug output 2012-01-18 17:27:55 +01:00
Olaf Bergmann 10c2ce6bbd support for confirmable responses to check if observers are alive 2012-01-18 13:29:50 +01:00
Olaf Bergmann a8591a103a bugfix: do not include Token in hash for transaction id 2012-01-17 16:31:24 +01:00
Olaf Bergmann 5f4209e04b observe 2012-01-13 18:43:38 +01:00
Olaf Bergmann cc116c3b5f API change to allow for post-processing of responses in handle_request().
A pre-defined response is passed as parameter to registered method handlers.
This change was required specifically to use method handlers to generate
observer-notifications.
2012-01-06 16:55:49 +01:00
Olaf Bergmann d1e394bec8 functions required for coap-observe 2012-01-06 15:28:49 +01:00
Olaf Bergmann 4afb4f3c4a init static PDU buffers; bugfixes 2012-01-02 21:41:08 +01:00
Olaf Bergmann 13bd84d850 print_wellknown() needs access to resource_storage structure (Contiki-specific) 2011-12-24 23:09:23 +01:00
Olaf Bergmann 1078486518 get rid of uthash and use Contiki's static memory blocks 2011-12-11 20:11:11 +01:00
Olaf Bergmann bf2ef64850 use global uIP data buffer 2011-12-11 16:10:10 +01:00
Olaf Bergmann 2746d0f814 Initial version for Contiki-Server (target minimal-net or mbxxx) 2011-12-07 15:49:43 +01:00
Olaf Bergmann 298ad4fffa Cleaned debug output (now use -v9 to get all of it) 2011-11-17 09:43:57 +01:00
Olaf Bergmann f7ee04e790 bugfix (thanks to Philippe Valembois) 2011-11-02 17:29:08 +01:00
Olaf Bergmann 76271e1cbf fixed type conversions (thanks to Philippe Valembois for pointing this out) 2011-11-02 17:20:50 +01:00
Olaf Bergmann d6a193c57d Fixed transaction matching for IPv4 addresses. 2011-08-23 12:14:43 +02:00
Olaf Bergmann 8dcaf0f917 More support for asynchronous transactions ('separate responses') 2011-06-23 18:49:09 +02:00
Olaf Bergmann 3f8ff29ecf bugfix: use correct id remove request from retransmission queue 2011-06-23 10:53:44 +02:00
Olaf Bergmann 60d68d7d62 fixed data pointer in coap_read()
some minor bugfixes
example for separate responses (server side only)
2011-06-22 18:07:50 +02:00