Issue:
bbfdmd can defer a top-level ubus request and then never reply
when a matching backend call fails before the async request is
registered.
Cause:
The async fan-out path increments pending request state before
calling ubus_invoke_async(). If that setup call fails, bbfdmd frees
the tracker but leaves no in-flight request that can complete the
deferred parent request.
Fix:
Mark matching services before launching backend calls, count only
successfully started async requests as pending, and send an
immediate deferred reply when no backend request was started.
When using macros, both any occurence of arguments and the macro itself
have to be enclosed in parenthesis to prevent unintended behaviour with
operator precedence.
For now, only fix the one causing a -Wint-conversion warning in GCC 14
when using constructs like these, where two macros are used together and
expand to both two comparisons and two nested ternary expression.
dhcpmngr.c:502:41: error: pointer/integer type mismatch in conditional expression [-Wint-conversion]
502 | if (DM_STRCMP(parent_s, section_name(s)) != 0)
Given the very heavy use of macros in this project, there are probably
more instances of this issue in the code and it can cause actual logic
errors. While at it, double evaluation should also be checked for.
Link: http://web.archive.org/web/20140127211232/http://docs.freebsd.org/info/cpp/cpp.info.Macro_Parentheses.html
Link: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/macro-parentheses.html
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
CMake 4 has deprecated compatibility with old versions < 3.5, update
minimum required CMake version.
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>