Olaf Bergmann
c38a6d9ca4
Made private functions static to quiet compiler warnings
2015-03-10 13:25:08 +01:00
Olaf Bergmann
9b1ab5eef3
server.c: Declare unused parameters to make -Wunused quiet
2015-03-10 13:06:03 +01:00
Olaf Bergmann
4ca91190d6
Revised time-related functions to get rid of clock_offset for POSIX platform.
...
* Removed tne preprocessor defines for coap_tick() and coap_clock_init() --
this made the code less readable and seemed to be of little use.
* Introduced the new type coap_time_t to represent wall clock time. On POSIX,
this is the number of seconds since the epoch, while on embedded systems
without a real time clock, this could be the number of seconds since the
last reboot. The new function coap_ticks_to_rt() is used to convert
coap_tick_t to coap_time.h. Currently, this is a division by COAP_TICKS_PER_SECOND
on all platforms.
* POSIX: coap_tick_t is now defined as unsigned long to avoid overflows in
coap_ticks().
2015-03-08 15:14:43 +01:00
Olaf Bergmann
7e300c04d9
fix CoAP RFC number in comments
2015-03-03 12:29:13 +01:00
Olaf Bergmann
8ca0840b41
changed name of config.h to coap_config.h
2015-02-15 22:45:51 +01: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
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
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
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
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
799edd524c
bugfix: Memory leaks in rd.c - ID: 3542467 (patch from John Sucaet)
2012-07-17 14:44:10 +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
3712bcf30a
handler for /async (generates separate responses)
2012-03-08 01:38:46 +01:00
Olaf Bergmann
8543ef7c4f
fixes for new API
...
Caution: this code is not yet tested thoroughly
2012-03-07 20:16:22 +01:00
Olaf Bergmann
8dcaf0f917
More support for asynchronous transactions ('separate responses')
2011-06-23 18:49:09 +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
Olaf Bergmann
7876566085
removed flags that are not supported on some platforms and seem not to be required here
2011-06-17 11:20:35 +02:00
Olaf Bergmann
8a0c7a8c76
Aligned server and client to new API, stripped down server
...
tiny.c is out of date, though
2011-06-16 18:25:46 +02:00
Olaf Bergmann
15fd4ec0de
Started to replace subscribe by generic async support.
2011-06-13 19:01:52 +02:00
Olaf Bergmann
3358f2901d
Fixed license info.
...
Options iterator.
Address abstraction to allow IPv4 addresses.
more changes for draft-ietf-core-coap-06.
2011-06-02 02:43:59 +02:00
Olaf Bergmann
38429f7541
API change: Pass local interface address to coap_new_context.
...
Changed library numbering to better reflect API changes.
2011-01-10 16:59:45 +01:00
Olaf Bergmann
d9f8b5dbb8
fixed wrong usage message
2010-11-24 14:42:01 +01:00
Olaf Bergmann
758b7f775e
Applied patches from Markus Becker (thanks!)
...
* 0001-Trailing-whitespace-cleanup.patch
* 0001-Went-back-to-2.65-of-autoconf.patch
* 0002-Fix-compiler-warning-for-str.patch
* added several files to Makefile target .gitignore
2010-11-22 13:01:00 +01:00
Olaf Bergmann
56c3f7868c
better token handling
...
return 200 if data-sink is empty
2010-11-05 13:56:12 +01:00
Olaf Bergmann
2d25b6f262
changes from draft-ietf-core-coap-03
...
* removed option Uri-Scheme
* added support for Uri-Query
* version number increment (0.07)
2010-10-26 14:40:55 +02:00
Olaf Bergmann
aa7eaad6d7
dynamic creation of link set for .well-known/core
2010-10-23 23:19:27 +02:00
Olaf Bergmann
193934b6f8
added support for Etag and Max-age
...
improved resource handling in example server
2010-10-23 18:59:20 +02:00
Olaf Bergmann
756cefee23
improved server salutation
2010-10-22 18:29:40 +02:00
Olaf Bergmann
334ee8ec32
* fixed handling of PUT and POST
...
* POST now returns Location header
* check critical options
* added option Accept from draft-bormann-coap-misc-06.txt
coap-client now has option -A to take list of accepted types
2010-10-22 18:17:29 +02:00
Olaf Bergmann
94cc2c4f42
added license information and general project information
2010-10-18 14:53:04 +02:00
Olaf Bergmann
1a403845ca
Made libcoap configurable
...
* moved Makefiles to Makefile.in
* test for tools, headers, libs and compiler features
* generate config.h which is included by coap.h
2010-10-18 12:09:51 +02:00
Olaf Bergmann
f8e4df0d52
moved coap-server to subdirectory examples
2010-10-15 10:43:59 +02:00