- Moved the NULL check after memory allocation to occur before the memset call.
This prevents potential undefined behavior if the allocation fails.
- Ensures safe memory handling and avoids crashes due to dereferencing NULL.
Signed-off-by: CMT-Ashish <ashish.macwan@comminent.com>
Signed-off-by: ashishmac7 <ashishmac777@gmail.com>
When an empty ACK is received set the timeout for the separate response
to COAP_SEPARATE_TIMEOUT.
Signed-off-by: Sebastian Schoch <sebastian.schoch@husqvarnagroup.com>
A received message was not processed if the mid does not
match a pending operation.
Now check token instead of only mid.
Signed-off-by: Sebastian Schoch <sebastian.schoch@husqvarnagroup.com>
This hopefully resolves the problem with failing artifact upload.
Source of the changes: https://github.com/ossf/scorecard/, file
.github/workflows/scorecard-analysis.yml
In CoAP it's possible that a packets payload is bigger than the block
size.
Usually the complete message size must fit into the configured max.
packet size.
In case of block-transfer the payload (without header and options) needs
to fit into the block size.
Remove the client context from server only after calling the monitoring
callback when handling a de-registration. A as result, the client
information is still available in the server context during the callback.
Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
Building the unit tests can now be disabled with a CMake cache variable.
This is useful on platforms where `CUnit` is not available or when
working on an embedded platform.
The compiler produces a segfault on the emulated architectures. To be
able to continue the work on Wakaama we disable testing on these
architectures for the time being.
Working on the project is easier, when all modes and most other features
are enabled by default.
The baseline for CodeChecker needs to be adjusted, because more code is
now analyzed. It just reports more findings of issues that were already
around before.
CodeChecker combines multiple static code analysis tools including
`clang-sa`. It also provides the possibility to check against a baseline
to report only newly introduced issues.
Moreover it is simpler to use.
It could eventually replace `clang-sa` completely in the pipeline.
The examples are now individual projects, which use Wakaama as external
dependency. There is no need anymore to enable the examples in the CMake
project.
The client example projects now use Wakaama as a direct dependency. They
have also been split into three different projects (udp, tinydtls and
raw_block1). The CI and integration tests were adjusted for the new
project.
This makes use of the fact that we have moved CI to Ubuntu 24.04, and
are no longer constrained to the old versions offered by Ubuntu 20.04.
Please note: clang-format-18 does return an non-zero exit code when
changes have been found. For this reason, it gets now run in a subshell
which has the pipefail option disabled.
OpenSSF scorecard does not want us to upgrade to unspecified versions.
Removing the update seems like the simplest solution, as the version
contained in the ubuntu-20.04 base image is recent enough.
While we are not perfect, this gives us a clear list of tasks to do in
order to become better.
While I am listed as owner of the badge, everyone with write access to
the repository should be able to update its data.
The static library can be configured with CMake variables and then be
linked to user applications.
Wakaama became difficult to build and to maintain. Among other things,
there are defines and compiler flags that have to be set, the right set
of source files need to be selected and the correct include directories
have to be provided.
Therefore we rely on CMake and provide the users of Wakaama a static
library, which is relatively simple to build with a given set of
requested features.
This also helps with modularizing Wakaama to improve maintainability.
Server mode is enabled, if no mode (client, server or bootstrap-server)
is selected. A warning is submitted to inform the user of Wakaama about
the default. This simplifies testing and CI.