In those initialization paths (where possible)
use the `die()` alternative to the `abort()` one.
`die()` gives an explanatory message,
which is friendlier for configuration/startup failures.
Change-Id: I5d79c26925cf3adaebf83dd6bcac756418745275
The `fill_initial_rtpe_cfg()` func doesn't copy
`RTPE_CONFIG_STR_PARAMS` and `RTPE_CONFIG_CHARPP_PARAMS`,
even though the `unfill_initial_rtpe_cfg()` func frees them.
Globally it starts zeroed and this may never crash,
but then the snapshot is still incomplete.
Change-Id: I448ee6f8b9a22ad066bb57a9acd14134b7a71869
When failing to read the transcode config
for the destiantion codec, log accordingly the destination codec,
not the source one.
Change-Id: I1211cde6e1d055169e809e8a49c6f88b0028e3ec
Resolve file name conflicts between different components
Ensure shared log levels are identical across components
Encapsulates lib/*
Change-Id: If848d6fa0e4cd8eac88ce9e63ee77fc5a7a481fd
When parsing the config validate general
and per-iface port ranges:
- port min < port max
- 1 < port-min and port-max < 65535
Change-Id: I9f336e51f9bb32dcccee965d51dc552f86934fe3
The documented behavior is:
- if not set at all, set to 180s by default
- if set to 0, then will be ignored in media player
- if set to > 0, then will be used to set the value
Current code is inconsistent, 0 is always reset to 180s,
hence 0 value can never lead to ignoring.
Only reset to 180s the `-1` (default value, means never parsed).
Also clarify a little bit more the description of the option.
Change-Id: I5c3e63ffaca6271424783eeba828578e54c819e5
Check that `silence_detect` is in the range 0-100.
Also properly cast to actual `silence_detect_int` type which
is `uint32_t`.
The reason is that in the current code this can exceed `INT_MAX`
(for values near or above 50%) and also, values above 100% are not rejected.
Change-Id: Ic2359402879412926b18125e292c1969cda45203
Since this is parsed as type int, potentially can be given as -1.
Hence don't accept the range < 0 and > 2.
Change-Id: I8cdbf6e7626ec89bcd287742ddfbd49a3e1a3c90
In case when parsing fails in `redis_ep_parse()`
and it returns -1, we never de-allocate the actually
duplicated strings before (using `g_strdup()`).
For example with redis subscribe, where we have a fallback,
will leak and overwrite previous allocations.
So just free what's been allocated on the failure case.
Change-Id: I340f8998de9de80342f293c669719bea7c3a2a97
Already used by `--no-fallback`, so the rest just probably
inherited the same letter when doing copy-paste.
That is ambiguous and may cause option parsing conflicts.
Keep `F` only for the historical(most important) option
and set the rest to 0.
Change-Id: I6e4841f6e6614bfdfcf53d159130d6d676073d47
We indeed already didn't support it, just silently ignored.
Now just completely drop support even in flags parsing.
In the documentation it was removed already a long while ago.
Accordingly update tests and utils.
Change-Id: I2de8ad24b77aa5f43270640559bf809ed1c565bc
First check if the given `command_action` is a dict, and only then
allocate manipulation object. Because otherwise it still creates
an object, but then if the `command_action` isn't a dict,
it just returns. So useless. Hence re-order them.
Change-Id: I50bd334d8b945a5dd5177202168ef21cf2915458
The nested if-statement is correctly written,
but visually is fragile. Simple curly braces will prevent
anyone in the future introducing a dangling-if style mistake.
Change-Id: I3632702390f046c317eac4e5fef76bc7db707081
In the list of functions return actual err string.
And pass it up to the flags parser, which will return
the actual error if given.
This also will be used by call-backs.
Change-Id: I0d65508afb35763bb0673219d711df22f874b98f
If in the future `call_ng_flags_str_pair_ht()` starts returning
an error as string, pass it up to the caller's caller, in this case
`call_ng_flags_sdp_attr_helper_subst()`.
Change-Id: I59cd988bc30f62c2de159e614a195f8c1182814c
As other methods around (e.g. attr manipulations) log
in case the wrong type is used, do the same for sdp
media removal.
Change-Id: I576763c698431637aa5647b955178c3a25485806
If the type is wrong, just return.
This make it consistent with the rest of attr manipulations
helpers around.
Change-Id: I4fa8aba6ef8fa382e36b2042e60b51df7ad10494
Expression like macroses should usually be
wrapped in parentheses.
Then they behave predictably, when for example
embedded into larger expressions,
and also so future edits do not accidentally introduce precedence bugs.
Change-Id: I4ac485c2e1ed58507f4efeec69de63a6080523c2
With timestamps handling, which want to operate on signed integers.
Return the signed max value given from the calls of `atomic64_get_na()`.
Raw-cast the output of `atomic64_get_na()` to the signed integer as well.
Change-Id: Icc6878c9b08545f456ad5eb267ed6a3333c11ab7