Commit Graph
18 Commits
Author SHA1 Message Date
Olaf Bergmann c47d2fea3c renamed config.h to coap_config.h to avoid name clashes 2014-09-15 17:31:54 +02:00
Olaf Bergmann 6b2ea692f1 enclose single debug() in block to avoid warning when build w/o debug code 2014-07-24 21:01:35 +02:00
chrysn 1715b80d87 declare the inline function opt_finished static
an `inline int opt_finished` causes GCC to spew this error when used
with -std=gnu99:

libcoap/option.c:165: undefined reference to `opt_finished'

Signed-off-by: Olaf Bergmann <bergmann@tzi.org>
2013-05-03 12:52:05 +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 30ef92b638 bugfix in coap_check_option() 2013-01-18 16:39:33 +01:00
Olaf Bergmann 48c96cb7a8 bugfix: do not return options with numbers that exceed the filter
The iterator object now distinguishes between "not filtered" (using
COAP_OPT_ALL which is now set to NULL) and an explicit filter. When
filtering is used, only options between 0 and COAP_MAX_OPT can be
filtered from the option set. Use COAP_OPT_ALL for anything beyond
COAP_MAX_OPT.
2013-01-18 13:46:31 +01:00
Olaf Bergmann 6026c35b41 option accessor functions, improved option iterator
Removed any occurrence of option jumps from coap-12,
option iterator:
  - bad bit to track iterator status
  - option now points to the next field, the current
    option is delivered by coap_options_next()
2013-01-18 12:24:47 +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 8bfc00481a coap-12: option type numbers, option jumps and length coding 2012-11-20 12:24:15 +01:00
Olaf Bergmann c45cf23a61 new option encoding function 2012-10-25 18:18:49 +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 582e59f107 handling of long option lists 2012-03-20 18:47:46 +01:00
Olaf Bergmann fae51d1cc9 cleaned debug stuff 2011-12-11 15:57:24 +01:00
Olaf Bergmann 74c150654f Fixed invalid access in coap_option_next() 2011-07-28 18:45:30 +02:00
Olaf Bergmann 832f4b58fd Use pointers in macros for handling of PDU options. 2011-06-13 02:27:37 +02:00
Olaf Bergmann 852055628f Improved options processing with coap_opt_iterator_t 2011-06-02 02:40:42 +02:00