The syslog LOG_ definitions are defined in <syslog.h> and can be defined in
coap_debug.h (wrapped by a HAVE_SYSLOG_H wrapper to prevent duplicaton).
However, the coding order of
include <coap3/coap.h>
include <stdio.h
works, but
include <stdio.h
include <coap3/coap.h>
but fails if the application build environment does not define HAVE_SYSLOG_H
(as is the case of the examples in the examples/ directory).
The former "just" happens to work as the values of the variables are the same.
This fix is to remove the coap_log_t enum and replace it by simple #define
if LOG_ALERT etc. is not already defined.
Make coap_log_t int to remove Visual Studio compile warnings.
The pre-processor values COAP_DTLS_MAX_PSK and
COAP_DTLS_MAX_PSK_IDENTITY now can be set at build time. Both values
default to 64. Static buffer sizes in the TLS library wrappers are
adjusted accordingly.
Fix the coap_find_observer_cache_key() function comparison to correctly match
previously set up subscription.
Handle NULL return from coap_cache_derive_key_w_ignore().
Update diagnostic logging.
Start the reported Observe value from 2, to remove confusion with the
usage of values of 1 and 0.
There currently are 2 requirements for async (delayed response)
1. Application support to delay separate response while doing other processing
2. Delay any response for random time if receiving multicast request
The MID is used by the client to match initial response (empty ack or
piggy-backed response). Any subsequent response (usually the separate
response or unsolicited Observe) should have a different MID as generated by
the server (and are matched using the token).
Fix is to move the tracking of the client MID from coap_register_async()
(so 1. is supported correctly) into handle_request() for multicast requests
(so that 2. continues to be supported correctly).
coap_check_async() will then call the appropriate request handler with the
appropriate MID (application different, multicast same).
Following transmission of a large body by a server using BLOCK2,
session->lg_xmit is not getting released. It does get released when the session
is freed off.
A client doing transmission of a large body idoes release session->lg_xmit.
Timeout lg_xmit after 4 * ACK_TIMEOUT seconds after final block is transmitted.
Old version of GnuTLS, used in Raspbian, contains no definition
for GNUTLS_CRT_RAW. This patch fixes build error:
`error: ‘GNUTLS_CRT_RAW’ undeclared`
Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
man/coap.txt.in:
Include all the current man pages
man/coap_block.txt.in:
Clarification updates to handle questions being raised
man/coap_resource.txt.in:
Incoming PDU is now no longer NULL if triggered by Observe.
Remind users in the documentation that the full path defining the resource in
the uri_path parameter does not normally need a leading '/'.
E.g. It should be "full/path/for/resource", not "/full/path/for/resource".
This change adds 'SPDX-License-Identifier: BSD-2-Clause' [1] to
the source code files that originate in the libcoap project.
Note that not all files are tagged because they are pulled in
from other sources and thus may fall under a different license.
More information about these is contained in the LICENSE file.
[1] https://spdx.org/licenses/BSD-2-Clause.html