* use auto cleanup buffer variable
* use g_vasprintf instead of libc vasprintf
* rename length variable for clarity
Change-Id: Ibebb8cccd51aa2f5cf3704b73bf82472b73d6f19
On some systems (e.g. Github Travis) make seems to have a problem with
its job control, resulting in a race condition where multiple make
instances try to build the same file at the same time. For most files
this is not a problem, but those auto-generated using an append
operation (>>) the output file can become garbled. Solve this by using
an atomic file creation method.
Change-Id: I1acb2387e2ca6ca30ddc3742143fd910032bfbb0
Commit a6d2f9296 introduced usage of libevent_global_shutdown(),
which is available in libevent-dev >=2.1.1-alpha only.
For example travis CI is running Ubuntu 16.04 / xenial and ships
libevent-dev 2.0.21-stable-2, so we can't just raise the
build-dependency of libevent-dev to >= 2.1.1+ if we still want
to support older systems.
Change-Id: I9dcf9ca0a19f59051d42f0d2383d1938b60a97df
iptables-dev is only available until Debian/buster and no longer exists in
Debian/bullseye (current testing) nor unstable/sid:
| builddeps:. : Depends: iptables-dev (>= 1.4) but it is not installable
Even in Debian/buster iptables-dev is already a transitional/dummy package.
Support iptables-dev as alternative Build-Dependency, just in case
someone is building the package against a system where libxtables-dev
doesn't exist yet.
Change-Id: I28c4c81ac474c646d80a0146baa2446dde7073c3
The file utils/build_deps.sh was removed in commit e580c7c7f8,
adjust shellcheck execution accordingly.
Change-Id: Ibe454e98d02e026ef5cade9401e73a04975e6cc3
shellcheck v0.7.1 complains about a bunch of issues:
SC2154: status is referenced but not assigned.
SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
SC2235: Use { ..; } instead of (..) to avoid subshell overhead.
SC2236: Use -n instead of ! -z.
The "$status" variable disappeared in d4763aba14.
The init scripts of ngcp-rtpengine-daemon and
ngcp-rtpengine-recording-daemon had a logic bug, where a failing stop
action didn't properly return, but continued execution of the following
firewalling code (ngcp-rtpengine-iptables-setup). Thanks to Guillem
Gover for spotting this one. While at it, no longer execute under
'set -e'.
Change-Id: Ia50e76f615564a288627e6e42ec8f7eb082de74c