Commit Graph
123 Commits
Author SHA1 Message Date
Olaf Bergmann f2e132df23 resolved conflict 2014-06-19 15:22:07 +02:00
Maciej Wasilak 3d66bbb8e3 Fix message handler for client example
Fix 2 bugs in message handler:
- problem with sending confirmable next block requests
- problem with deleting pdu after sending
2014-06-17 18:33:05 +02:00
Olaf Bergmann d5dc48d97a Track local network interface for received packets.
Changed various functions to pass the local interface using the
new coap_endpoint_t abstraction. This change uses the functions
implemented earlier in commit 786ca6da (branch dcaf) but does not
use callback functions for network I/O.

This change closes bug #23 "server responds from wrong endpoint
(ipv6 address)" (POSIX only, CONTIKI and LWIP tbd).
2014-03-21 18:12:40 +01:00
Olaf Bergmann a3fae3ce3a Support cancellation of observe relationships using GET w/ Observe: 1.
Adding and removal of observes is now handled by libcoap. The application's
GET handler only needs to add the Observe option (see server.c:hnd_get_time()).
2014-03-09 02:27:52 +00:00
Olaf Bergmann ed9c7ee560 bugfix: #25 async example creates short packet
Increased packet size by 5.
2014-02-25 19:15:52 +01:00
Olaf Bergmann 909cccd05d Support for response code 7.31 to cancel observation relationships.
This new behavior is described in Section 4.6 of draft-ietf-core-observe-12.
The idea is to send a response with code 7.31 and the token to identify
the subscription.
2014-02-25 19:00:10 +01:00
Olaf Bergmann a3a17fcb1d use coap_opt_block_num() instead of COAP_OPT_BLOCK_NUM 2014-02-04 17:55:56 +01:00
Olaf Bergmann 3f69cd1e9b Use log levels from syslog.h when available.
Thanks to Dag Björklund for pointing this out.
2013-12-30 01:15:11 +01:00
chrysn af2096a047 add coap to the lwip example 2013-12-09 15:38:55 +01:00
chrysn 691a87d812 minimal server for lwip demo (no coap yet) 2013-12-09 15:38:49 +01:00
Olaf Bergmann b116fc6d79 adjust client and server example to relative timers 2013-11-06 22:34:48 +01:00
Olaf Bergmann accc094785 notifications and observer removal according to draft-ietf-core-observe-09 2013-07-23 17:33:03 +02:00
Markus Becker 5415743c30 Add token to request in example client. 2013-02-05 14:57:12 +01:00
Olaf Bergmann 8b8c3d9ac9 more fixes for option iterator
Renamed option in struct coap_opt_iterator_t to next_option to detect
errors.
2013-01-21 17:25:36 +01:00
Olaf Bergmann e8b5527d39 fixed payload creation in GET handler for resource /time 2013-01-18 17:18:34 +01:00
Olaf Bergmann 2bfedb9775 Klaus-encoding 2013-01-18 16:44:57 +01:00
Olaf Bergmann 8e19e0a594 Merge commit '1a9ddbde0c87f4354020a2e220d31e49d5e96134' 2012-10-23 21:27:09 +02:00
Markus Becker 1a9ddbde0c Fixed double option entry for -A. Added examples to the usage string. 2012-09-27 14:09:07 +02:00
Thomas Pötsch dc81c404b3 fixed memory leak for async response in server.c 2012-09-20 16:52:09 +02:00
Thomas Pötsch f64a8390e7 fixed typo in coap_resource_t 2012-08-29 11:43:49 +02:00
Olaf Bergmann ce9990996b fixed Location-Path in hnd_post_rd() 2012-07-17 19:00:56 +02:00
Olaf Bergmann fd8c499457 bugfix: Anomalies in query filtering - ID: 3540203 (patch from John Sucaet) 2012-07-17 16:33:42 +02:00
Olaf Bergmann 799edd524c bugfix: Memory leaks in rd.c - ID: 3542467 (patch from John Sucaet) 2012-07-17 14:44:10 +02:00
Olaf Bergmann a3f8fdaa59 split proxy uri to multiple options when exceeding 270 bytes 2012-07-04 15:58:21 +02:00
Olaf Bergmann aebd41b54a explicit port not supported in proxy option - ID: 3526542 (patch provided by John Sucaet)
do not include Uri-Host when Proxy-Uri is present
2012-07-04 14:03:32 +02:00
Olaf Bergmann 1c9bd4ca4e fixed Memory leak in client.c - ID: 3538646 (patch by John Sucaet) 2012-06-29 11:25:40 +02:00
Olaf Bergmann 3645d6b535 fixed Wrong prototype in client.c - ID: 3538627 (patch by John Sucaet) 2012-06-29 11:22:29 +02:00
Olaf Bergmann 2af20755eb fixed Observe counter 2012-06-07 15:31:49 +02:00
Olaf Bergmann 48bbed7aab removed auto-generated attribute "obs" 2012-06-07 15:16:31 +02:00
Olaf Bergmann e35a1216f8 re-apply fix for timer calculation 2012-06-07 15:12:44 +02:00
Thomas Poetsch 695f04a5f9 add observe to example server 2012-06-07 12:24:21 +02:00
Olaf Bergmann abf33c87f9 fixed bug #3526909 (Wrong unit conversion) pointed out by jsucaet
Applied patch provided by jsucaet.
2012-05-29 19:54:36 +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 ef70a4b913 fixed bug in Location-Path for POST (TD_COAP_CORE_02) 2012-03-24 14:22:55 +01:00
Olaf Bergmann afd4455406 send RST on observe notifications with unknown tokens 2012-03-23 17:48:08 +01:00
Olaf Bergmann a2d6a17e4e clear observation relationship after duration specified with -s 2012-03-23 17:06:17 +01:00
Olaf Bergmann c248ad4bf4 query filtering for TD_COAP_LINK_02 2012-03-21 16:42:20 +01:00
Olaf Bergmann 254f22cba7 POST handler for TD_COAP_CORE_02, TD_COAP_CORE_06 2012-03-21 12:45:24 +01:00
Olaf Bergmann c25ed5f7ac more for block transfer 2012-03-20 18:48:25 +01:00
Olaf Bergmann 9bbe764d26 update 2012-03-20 18:48:05 +01:00
Olaf Bergmann 6f0a4550c7 Testscripts for ETSI CoAP Plugtest, March 2012
Copyright (C) 2012 Stefanie Gerdes <gerdes@tzi.org>
2012-03-19 13:23:37 +01:00
Olaf Bergmann d716f33953 flush output file after writing received payload 2012-03-16 17:28:44 +01:00
Olaf Bergmann 89548f023d reset timeout when retrieving subsequent blocks 2012-03-15 16:05:52 +01:00
Olaf Bergmann 7daf193b53 modified block handling 2012-03-15 14:57:25 +01:00
Olaf Bergmann 19287baa92 fixed Uri-Path and Uri-Query for block transfer 2012-03-15 13:02:40 +01:00
Olaf Bergmann f02e459cb2 Revert "bugfix: copy Uri-options, token and host/port from initial request"
sent is empty for subsequent requests, so this approach does not work.
This reverts commit de465025c8.
2012-03-14 18:39:45 +01:00
Olaf Bergmann de465025c8 bugfix: copy Uri-options, token and host/port from initial request 2012-03-14 17:13:06 +01:00
Olaf Bergmann de41dd7c44 removed some debug output 2012-03-14 15:29:18 +01:00
Olaf Bergmann e6178d3586 TD_COAP_CORE_02, TD_COAP_CORE_03, TD_COAP_CORE_04, TD_COAP_CORE_06, TD_COAP_CORE_07, TD_COAP_CORE_08
added handlers for POST, PUT and DELETE
2012-03-14 14:50:44 +01:00
Olaf Bergmann db52a01c52 more info on current status 2012-03-11 17:48:13 +01:00