This problem is caused by this issue:
https://github.com/actions/checkout/issues/1809
Several comments include documentation on various environment variables
to force it to use the older nodejs release still, but probably those
various workarounds will stop working eventually.
Previously if the system had an interface with a static IP configured,
coturn would attempt to bind to that address, even if the interface was
down. This would fail, and prevent coturn from starting (even if there
were other usable interfaces)
Fixes#1533 and #1534
Memsetting `turn_params.default_users_db` before reading conf file, not
after.
Because auth is read in first iteration so secret was wiped out.
# test plan
Add new test script that uses config file to setup turnserver instead of
cli arguments and confirm it works (fails without the change)
The point of this change is to make the build instructions a bit more
straight forward. Since the hiresevent2 source files are only ever used
by the relay target, this scoping makes sense in general.
Use the include-what-you-use program to (partially) clean up header
includes, so that only includes which are needed, and no includes that
are not needed (or at least closer to that ideal) are done.
For a c-language project, the build-time improvements from this change
is minimal. This would have a much bigger impact on a C++ project than a
C-project for build times.
So for coturn, this change is mostly intended to just provide
consistency and make it easier to locate weird issues like strange
dependencies, and unnecessary connections between code.
The general approach here was:
- Always declare variables as close to where they are defined as
possible.
- Check for pre-conditions of functions before doing work (e.g. ensure
we can connect to the DB before doing a bunch of string formatting)
- Keep the scope of mutexes as reasonably small as practical.
- Use idiomatic C11, such as for-loops over the thing being iterated,
not while() loops over constants, or variables that aren't modified.
- Prefer if(fail){return} function-body after over `if(not fail){
function-body inside if} return;
Clang-tidy returns a clean bill of health, but while going through this
file i noticed a lot of things that raise questions.
Lack of checking column counts. Lack of handling the possibility of
multiple return values. Questionably handling of strings. Complete lack
of checking function inputs for invalid values (e.g. nullptr).
I'm not going to fix those, my organization doesn't USE the DB drivers,
so i have little interest in re-working the logic beyond addressing
clang-tidy warnings for my own sanity, but i did add TODO comments for
someone else to look at in the future.
Additional note: While the changes look very invasive.... they aren't.
I don't think there is a way to get github to ignore whitespace in the
filediff, but if someone were to compare the commit locally, they'll see
that almost all of the changes are just adjusting indentation.
Converts all of the variables in the uclient program that should be bool
but weren't.
A few other minor adjustments made at the behest of clang-tidy, but this
change does not address all of clang-tidy's complaints.
I'm having trouble testing changes in my own fork because many of the CI
workflows are only set to build on a pull request.
Better to just build on any commit.
I've left the docker builds as they are.
#1502 made APIs consistent with using bool as a return value where true
is success and false is failure
In a few places the change broke code
This PR fixes the breakage
The code used `get_system_number_of_cpus()` instead of
`get_system_active_number_of_cpus()` to configure number of relay
servers.
That caused incorrect number to be used on virtualized systems. See
#1468
Someone working on a branch in their own fork won't see the lint running
on their github-actions CI until they open a pull request.
It'd be much easier to ensure changes being worked on are going to pass
the linter if the linter runs before the last step of opening the PR.
rfc5769check.c file is using ERROR as a label for gotos but apparently
that name is already used for a constant and msvc analyzer detects it as
an error.
Rename it to "err" that is already used in other parts of the codebase
and also more consistent in terms of casing.
Co-authored-by: Gustavo Garcia <gustavogb@mail.com>