This fixes a reported error in coap_update_token() where a size_t
calculation is overflowed (but all ends up with the correct value).
Instead of adding an overflowed size_t, now subtract the reversed
size_t calculation as appropriate.
coap_update_option() and coap_insert_option() similarily updated.
Create a CMakeLists.txt.in copy of CMakeLists.txt containing LIBCOAP_*
skeletons where appropriate. When ./configure is run, CMakeLists.txt then
gets updated with the latest versioning ready for distribution and using.
CMake unfortunately does not handle, for example, 4.3.5rc1 (the rc1 suffix)
for the "project (libcoap VERSION xxx)", so this has to end up as 4.3.5
in CMakeLists.txt.
For the test suite, treat these tests as using the public API so locking
is handled by the underlying libcoap.
The only exception is for coap_delete_node() which is an internal function
and expects context to be locked on entry.
Fix generated response PDU in handle_request() to be of type CON
if reliable protocol (as a lot of code assumes it to be of pseudo
type CON) to stop a warning in coap_show_pdu().
Update session->addr_info from packet->addr_info before logging incoming
packet. Only seen on the first incoming packet for a client as subsequent
packets likely to be the same address..
Revert out change from #1276 and decrement token in coap_session_init_token() to
make sure starting token used is the same as that provided to
coap_session_init_token().
As done for GnuTLS and MbedTLS, add compile time support for changing
the DTLS retry timoouts.
$ ./configure CFLAGS=-DCOAP_DTLS_RETRANSMIT_MS=3000
to make it 3000 ms instead of the default of 1000ms.
A duplicate CON message is sent by the server if the client's ACK to the original
confirmable message did not reach the server.
See issue #1306 for full description: https://github.com/obgm/libcoap/issues/1306
Optional compile time thread safe code supported.
Locking is done at the coap_context_t level, and if enabled is primarily
done coap_threadsafe.c and coap_threadsafe_internal.h.
coap_threadsafe_internal.h causes coap_X() to get mapped to coap_X_locked()
throughout the libcoap library code with the exception of coap_threadsafe.c
if thread safe is enabled.