Avoid repeated calls to the memory allocated for port pool list
management by picking out the list elements without freeing them,
storing them in the stream_fd object, and then returning them to the
list when the port is released.
Change-Id: I67cd5039e62e4d2965e85d7ba7f0454f08f40494
The parser currently relies on the appropriate parsing functions
(dict_iter, list_iter) to be called to advance into and back out of any
sub-objects containd within the flags string. However, if an unknown key
is encountered, no parsing functions would be invoked, resulting in the
parser not skipping over the sub-object and subsequently a stray error
message in the log. Work around this by detecting unparsed objects and
then using a dummy list_iter to return to a good parsing position.
Change-Id: I908aff8b9be8d12644a9faea0dcf3bf3535faf32
Split up the function into one part that parses out the string, and
another part that handles the individual pieces of information. Switch
to bool types and const arguments where appropriate.
Change-Id: If3ec8a048dbe1141dfc0b1150b69eb445216aad1
Add a callback type to read config groups and their contents based on a
group prefix.
Unused at this point.
Change-Id: I7d9e043e96f48e599bc4da2d8ef4079559cb8b47
Switch from specialised handling of config sections (used to load
signalling templates) to a more general approach using a callback
mechanism. This allows us to add more information to the config file
while keeping the details of the underlying GKeyFile hidden. Use a typed
hash table for type safety.
Change-Id: I71ddfda0202b47df363bcc5acf1725078774f8f1
The codec `strip` option used to remove codecs not only from the
destination (offer to) monologue, but also from the source (offered by)
monologue. Change this to only affect codecs on the destination
(offering to) side. This fixes a problem of not being able to have
different `strip` options set for different branches.
As a side effect, this breaks existing use cases of using `strip` to
ignore codecs on the source monologue side. This functionality is
restored by adding `codec-ignore` in the following commit.
Change-Id: I022748fffc29caa3a8c96f514b2021f152e43686
These are potentially computed from inside each subdir, and in addition
due to what appears to be a regression in GNU make 4.4, where it is
reevaluating variables that contain $(shell) functions, many times (in
the order of thousands, this was slowing down the build, were on the
Debian amd64 build daemons it went from 5m with GNU make 4.3 to 2h40m
with GNU make 4.4. Although the bulk of the slow down has been fixed
with previous commits, the remaining optimizations are only to avoid
this potentially happening again in the future, and to reduce useless
duplicate work.
Instead of trying to cache the values from within make itself, where
programming this there is extremely painful, and does not seem to be
able to greatly reduce the number of calls, because the build system
is going to be called multiple times for different targets. Simply
externalize the generation into several shell scripts, that we call
to generate a make fragment that then we include from the various
Makefiles.
For a Debian build with GNU make 4.3, this reduces the amount of total
pkg-config calls from around ~1600 to 128, for dpkg-buildflags from
~1100 down to 6, and for dpkg-parsechangelog from ~56 to 17, but the
slow down is not as significant there anyway.
For a Debian build with GNU make 4.4, this reduces the amount of total
pkg-config calls from around ~2600 to 128, for dpkg-buildflags from
~2800 down to 6, and for dpkg-parsechangelog from ~350 to 21.
For a Debian build with GNU make 4.4, this reduces the build time
on this system from 2m10s to ~ 1m30s.
Change-Id: I427d0ea5106dc6ed1ff9e664ccdba2fa0725b7d0
This variable is unknown to dpkg-buildflags. This also reduces the
amount of global calls generated with GNU make 4.4 (which has a
regression causing massive amounts of shell calls to be generated).
Change-Id: Ia9d7099228bf5e181df4725939ed4f76f1e63dc9
This makes sure the target is the default, regardless of the place where
it gets declared, so that we do not get surprises due to targets
declared in includes that might happened to be performed before the
default target.
Change-Id: I2fab47ccb46d68dc56332acef966e369c5183c07
Starting with GNU make 4.4, build time have massively regressed
where before they would take 5m on amd64 now can take 2h40m. While this
seems clearly broken, the release notes are filled with notices for
breaking changes, and in particular the one for passing all make
variables down to the invoked programs executed via the «shell» GNU make
function, so it is not clear what is expected breakage and what is not.
This has been reported in Debian, but not yet upstream, and while it
seems like a clear regression, it's not clear what will be the upstream
take on it. For now apply workarounds that do not change semantics, and
which do not regress with older GNU make versions.
Use the GNU make «origin» function instead of «?=» which defaults to
defining a variable as a recursive one. Coerce already defined variables
into simple ones to avoid GNU make re-evaluating these variables for
each «shell» function invocation.
Ref: https://bugs.debian.org/1092051
Change-Id: I076fc05dd616918473a22e7e942fecfdc9851d47
Add a semicolon only for the last switch statement
going in a row.
Fixes this Coverity Scan detected defect:
*** CID 1621493: Control flow issues (MISSING_BREAK)
/daemon/call_interfaces.c: 1063 in call_ng_flags_flags()
1057 out->allow_no_codec_media = 1;
1058 break;
1059 case CSH_LOOKUP("allow-transcoding"):
1060 case CSH_LOOKUP("allow transcoding"):
1061 out->allow_transcoding = 1;
1062 break;
>>> CID 1621493: Control flow issues (MISSING_BREAK)
>>> The case for value "15" is not terminated by a "break" statement.
1063 case CSH_LOOKUP("always-transcode"):;
1064 case CSH_LOOKUP("always transcode"):;
1065 static const str str_all = STR_CONST("all");
1066 call_ng_flags_esc_str_list((str *) &str_all, 0, &out->codec_accept);
1067 break;
1068 case CSH_LOOKUP("asymmetric"):
Change-Id: I4d6bc56d8149acd2d0d69f122e420c5a8c6ae2e1