Information set up in the pseudo session held in endpoint->hello is not freed
off when coap_free_endpoint() is called.
A solution is to split coap_session_free() into two parts with
coap_session_free() calling a new function coap_session_mfree().
Then coap_mfree_endpoint() can call coap_session_mfree() to free off the
endpoint specific hello information.
Makefile.am
Add coap_mfree_endpoint and coap_session_mfree to the CTAGS_IGNORE list.
libcoap-2.{map|sym}
Remove coap_mfree_endpoint as it is not a public function
include/coap2/coap_session.h
Add in new coap_session_mfree() function definition
src/coap_io.c
Call coap_session_mfree() from within coap_mfree_endpoint()
src/coap_session.c
Move some of the functionality out of coap_session_free() into a new
function coap_session_mfree() and call coap_session_mfree().
These new functions can be used to either update a buffer with, or coap_log()
out the current runtime TLS library along with the version of the library
that libcoap was built against.
include/coap2/debug.h
src/debug.c
libcoap-2.map
libcoap-2.sym
Support for the new functions coap_show_tls_version() and coap_string_tls_version().
This allows an application to determine what the built version is
as well as what the runtime version of a TLS library is.
include/coap2/coap_dtls.h
Add built_version to coap_tls_version_t
src/coap_openssl.c
src/coap_tinydtls.c
Additionally populate coap_tls_version_t with build_version when
coap_get_tls_library_version() is called.
src/coap_tinydtls.c
Correct the version returned as actual TinyDTLS version instead the
binary value of a DTLS packet type.
This then removes the need for name polution/confict of debug(), info() and
warn() when building other projects that use libcoap and need to #include the
libcoap header files
Updated:
examples/client.c
examples/contiki/coap-observer.c
examples/etsi_iot_01.c
include/coap2/debug.h
src/async.c
src/block.c
src/coap_io.c
src/coap_openssl.c
src/coap_session.c
src/coap_tinydtls.c
src/debug.c
src/mem.c
src/net.c
src/option.c
src/pdu.c
src/resource.c
src/uri.c
If the debug() etc. macros are still required, then the change to
include/coap2/debug.h just needs to be reverted.
There are also a couple of space changes - to cause log output to be columnar
e.g "ERR" was padded to "ERR ", so that "EMRG" or "ERR " log output output was
aligned in the same way.
This is a replacement for PR#51, and partially deals with name polution issues
raised in Issue #50.
Parameter re-aligned some long strings, splitting strings across multiple lines
Automake is using the variable 'libcoap_include_HEADERS' as the list to
install the header files and is this list installing to $(prefix)
basically.
This commit is changing the primary installation folder for the header
files in addition to the previous commit.