Support is required (RFC7252: 4.8.1. Changing the Parameters) to support
changing max_retransmit, ack_timeout and ack_random_factor values per
session instead of just using the default values.
Define struct coap_fixed_point_t to handle fixed point parameters
Added functions
coap_session_set_max_retransmit()
coap_session_set_ack_timeout()
coap_session_set_ack_random_factor()
coap_session_get_max_transmit()
coap_session_get_ack_timeout()
coap_session_get_ack_random_factor()
'cc Rate Control' moved from net.c into coap_session.h and updated to use
coap_fixed_point_t values where appropriate.
John Carter has provided this (slightly edited) patch to set len to 0
for PDUs that do not contain a payload. This makes this function more
robust for callers that do not care about the function result.
This change fixes issue 120 [1].
[1] https://github.com/obgm/libcoap/issues/120
The dead code detected by Coverity scan in CID 1458395 has been
replaced with explicitly setting the return value to 1 (the default
that has previously been used).
As coap_send() automatically releases the specified pdu, it must
not be accessed after coap_send() has returned.
This change fixes CID 1458399 reported by Coverity scan.
coap_send() always takes the ownership of the pdu that is passed
as argument to send, i.e., the memory will be released automatically
when the pdu is not needed anymore.
In CID 1459612, Coverity scan has complained about uninitialized use
of the variable bytes_read. Although this is a false positive here,
it seems to be more safe to always initialize bytes_read.
In coap_session_create_client(), the default port for TCP did not
correctly distinguish between TCP and TLS as pointed out in [1] by
Joan Shallow. This change applies the suggested fix.
[1] https://sourceforge.net/p/libcoap/mailman/message/36092184/
The value of the observe option is kept for each resource rather than being global to the context.
The value of the observe option must wrap to be stay below 2^24.
The value of the observe option must be different from the initial value when a notification is sent.
Make coap_pdu-t independent of the header style.
Use C99 sized types when applicable.
Use transaction ids in host byte order in the library.
Make coap_pdu_t payload storage grow on demand.
Add parsing and encoding of PDUs with UDP or TCP style headers.
Adapt examples and unit tests to the new PDU format.