Commit Graph
28 Commits
Author SHA1 Message Date
Olaf Bergmann 8a96bfa5c2 net.h: fixed ugly macro usage in coap_new_message_id()
context->message_id has been incremented as a side-effect of calling
the htons macro. To avoid potential issues with this, the increment
operation has been moved outside the macro call.
2015-05-23 13:58:41 +02:00
Carsten Schoenert a4c163937a i/c/subribe.h: whitespace cleanup, reformatting, no changes
Just some cleanup like whitespace, punctiation marking and indentation
issues.
2015-04-14 16:05:43 +02:00
Carsten Schoenert 1d79a041ba i/c/str.h: whitespace cleanup, reformatting, no changes
Just some cleanup like whitespace, punctiation marking and indentation
issues.
2015-04-14 16:05:42 +02:00
Carsten Schoenert a21adde03e i/c/resource.h: whitespace cleanup, reformatting, no changes
Just some cleanup like whitespace, punctiation marking and indentation
issues.
2015-04-14 16:05:40 +02:00
Carsten Schoenert d15ecb60ec i/c/prng.h: whitespace cleanup, reformatting, no changes
Just some cleanup like whitespace, punctiation marking and indentation
issues.
2015-04-14 16:05:38 +02:00
Carsten Schoenert 5d7c25c289 i/c/pdu.h: whitespace cleanup, reformatting, no changes
Just some cleanup like whitespace, punctiation marking and indentation
issues.
2015-04-14 16:05:36 +02:00
Carsten Schoenert 6588dfe810 i/c/option.h: whitespace cleanup, reformatting, no changes
Just some cleanup like whitespace, punctiation marking and indentation
issues.
2015-04-14 16:05:35 +02:00
Carsten Schoenert 8d22cd6544 i/c/net.h: whitespace cleanup, reformatting, no changes
Just some cleanup like whitespace, punctiation marking and indentation
issues.
2015-04-14 16:05:34 +02:00
Carsten Schoenert c43a47578c i/c/mem.h: fix doxygen warnings, no functional changes
Just fixing up the warning from doxygen so the documentation will be
more usable. Also fixing up some whitespace, punctiation marking and
indentation issues.
2015-04-14 16:05:32 +02:00
Carsten Schoenert 5fca704c4e i/c/hashkey.h: whitespace cleanup, reformatting, no changes
Just some cleanup like whitespace, punctiation marking and indentation
issues.
2015-04-14 16:05:31 +02:00
Carsten Schoenert 9ab6d050e6 i/c/encode.h: whitespace cleanup, reformatting, no changes
Just some cleanup like whitespace, punctiation marking and indentation
issues.
2015-04-14 16:05:28 +02:00
Carsten Schoenert 62ddbd232c i/c/debug.h: whitespace cleanup, reformatting, no changes
Just some cleanup like whitespace, punctiation marking and indentation
issues.
2015-04-14 16:01:34 +02:00
Carsten Schoenert 7af8edf8a9 i/c/coap_time.h: whitespace cleanup, reformatting, no changes
Just some cleanup like whitespace, punctiation marking and indentation
issues.
2015-04-14 16:01:33 +02:00
Carsten Schoenert 54abde5943 i/c/coap_io.h: whitespace cleanup, reformatting, no changes
Just some cleanup like whitespace, punctiation marking and indentation
issues
2015-04-14 16:01:31 +02:00
Carsten Schoenert 9da72684c8 i/c/coap.h: whitespace cleanup, reformatting, no changes
Just some whitespace cleanup.
2015-04-14 16:01:29 +02:00
Carsten Schoenert 4d7752ddf0 i/c/block.h: whitespace cleanup, reformatting, no changes
Just some cleanup like whitespace, punctiation marking and indentation
issues.
2015-04-14 16:01:17 +02:00
Carsten Schoenert e2683eb218 i/c/bits.h: whitespace cleanup, reformating, no changes
Just some cleanup like whitespace, punctiation marking and indentation
issues.
2015-04-14 16:01:09 +02:00
Carsten Schoenert e256844253 i/c/async.h: whitespace cleanup, reformating, no changes
Just some cleanup like whitespace, punctuation marking and indentation
issues.
2015-04-14 15:55:24 +02:00
Carsten Schoenert ed59118841 i/c/address.h: whitespace cleanup, reformating, no changes
Just some cleanup like whitespace, punctiation marking and indentation
issues.
2015-04-14 15:54:33 +02:00
Olaf Bergmann 2250db4c95 address.[hc]: make coap_address_equals() not inline on POSIX
gcc-4.8 -Winline keeps complaining about the function's size, so
it is now placed into address.c.
2015-03-11 16:08:58 +01:00
Olaf Bergmann ecda1426ac resource.c: Increase use of coap_malloc_type() and coap_free_type()
coap_malloc_type() and coap_free_type() provide an abstract API for
dynamic memory management on different platforms. resource.c still
is in transition and needs more cleanup.
2015-03-11 14:59:40 +01:00
Olaf Bergmann 65620fde3e resource.[hc]: Replaced custom list structures by utlist macros.
The CoAP resource management is based on uthash and utlist for
platform POSIX but used a custom list implementation for Contiki.
This modification replaces the list handling by utlist macros
entirely. A set of convenience macros has been defined to access
the resources stored in a CoAP context with respect to the
preprocessor symbol COAP_RESOURCES_NOHASH.
2015-03-11 14:28:24 +01:00
Olaf Bergmann 0c53e63a3d Fixed URI parser bug and removed broken parser iterator
The parser iterator did not break up URIs correctly. As this
cannot be fixed easily, the parser iterator has been removed.
coap_split_path_impl() now operates directly on the message
buffer instead of the iterator abstraction.

This bug also caused t_parse_uri12() in the URI test suite
to fail.
2015-03-09 17:49:21 +01:00
Olaf Bergmann 8894f2ffec Fixed a couple of warnings from doxygen. 2015-03-09 14:53:01 +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 71de08ac5f Fix warnings in resource.c
Internal functions are now static. print_wellknown() is exported
as coap_print_wellknown() to make it accessible from net.c and
for unit tests.
2015-03-04 14:55:26 +01:00
Olaf Bergmann e297a0ca76 Fix warnings in net.[hc]
Internal functions are now static. wellknown_response() is exported
as coap_wellknown_response() to make it accessible for unit tests.
2015-03-04 14:43:42 +01:00
Carsten Schoenert fc9b47167a moving library related files to new folders
In preparation for changing the make buildsystem to a fully autotools
controlled system moving the core libcoap source files to a better logical
place.

All the library related header files moving to include/coap/ to get
all the public and local header files in a separate place. Also moving
the C source files of the libcoap library to the folder src/.
2015-03-03 19:21:43 +01:00