Deleting a call can have the side effect of changing the active Redis DB
on the writing instance. Restore the correct DB afterwards if needed.
Fixes#1905
Change-Id: I12dae767ffa5d25703e024d2ec59aa21ba9da101
If keyspace notifications are used at all, the respective objects and
threads must be created during startup. This requires at least some
keyspace to be configured. To support usage without any keyspaces
initially (and add them during runtime), add a special case (set
keyspace to -1).
Convert all keyspace variables to signed ints. Ignore negative keyspace
numbers where appropriate. Support Redis endpoint addresses without
database number.
Fixes#1902
Change-Id: I45a3c87bc515f9b14e64ec1ec0906dde271b5f8d
When re-establishing connection to redis via hostname,
at a point of time upon new re-resolve hasn't been done yet,
use a hostname for logging of failing attempts to connect,
so that it doesn't confuse users with the older IP.
For the backwards compatibility, this will still log an IP
for those setups using the IP address and not a hostname.
Change-Id: I28f9a2a194b5009040ac8ed909a65fec1f199663
When re-connecting to the remote redis server
try to re-resolve if the redist hostname
was an FQDN and not IP address.
Change-Id: Ie80e1d1a1ea76811c54123201ad4fe8cb64fc748
Convenience wrapper for &STR()
This is useful so that STR() and STR_DUP() can be extended to avoid
duplicate expansion of its macro arguments.
Change-Id: Ieae170807c11b0cdd8b52fac9bab98dccdc2b951
Instead of having to explicitly pass the call object to each invocation,
keep one thread-local reference to a call, implicitly set by setting the
logging context.
Add helper functions to set and release the respective reference.
Change-Id: Ic0d82eeaa403467d50dae867e33fdf9b9dd7cec5
Same as ptime but for the maxptime.
Also add replication of it.
This is required later to be used for the sdp_create() handling.
Additionally: fix tests, because maxptime now takes another
place within the media session, which doesn't affect functionality.
Change-Id: I058e35323849679976c60b2e9fb2555fd0168e67
Obsolete str_init(), rename STR_INIT() to just STR(), and replace all
instances of str_init() with STR().
no-op
Change-Id: I981529063ad2ea26089add467f7a84b638dbf423
Allocate sdp_origin members using `str_init_dup_str()`
which uses g_malloc, so that when freeing the sdp_origin
structure later in `sdp_orig_free()` it doesn't inadvertently
lead to the seg fault.
Otherwise if any member isn't recovered (e.g. username)
it remains pointing to NULL with 0 len, which will be gracefully
handled in `str_free_dup()`.
Change-Id: I131f0096103052445754cc01ac5072776e957cda
Instead of using separate char arrays storing
parts of the SDP origin (in monologue), just
use the corresponding structure.
Deprecate unused parts used before.
Additionally add logic:
don't set `->session_sdp_orig` for monologues
with empty tags. This leads to setting origin line
to those monologues, which will later skip updating it
with its own (so real one).
This is fixes the case with the offer/answer model,
where offer always sets its origin for the other side,
meanwhile the other side hasn't given the answer yet.
Then later this answer related monologue never gets
its real origin.
For this sake also adopt logic of `sdp_version_check()`
which serves 'SDP-version' and 'force-increment-sdp-ver'
flags.
Change-Id: I17f3ff67e1b3dafca797c5feb876ebb238dceaa2
Update the bandwidth in the media object only on the side that has
received the SDP. Then when printing the SDP, look up the peer's media
via the subscriptions and use that one's bandwidth values.
Change-Id: I53c99b3628f53b2469f4cd73eb486c0110d989ba
Use relaxed-order atomic ops to access config variables that can be set
during run time.
Rename config_lock to keyspaces_lock as the keyspaces list remains the
only object that it protects.
All other config variables aren't settable at runtime and so don't
require locks or atomic ops.
Change-Id: I7e01a34a4818a558d5648ae27a86f9880a95d050
... and change to 32 bit.
Remove functions to retrieve kernel stats as they don't do anything any
more.
Add RTCP index information to /list output.
Change-Id: Ia087c8c3913daf83a0749d6a048682b7248eb38b
Use the already existing ext_seq (in shm) in place of srtp_index as
these carry duplicate information.
Kernel still tracks its own index in the crypto context at this point.
Change data type from 64-bit to (unsigned) int as we don't need that
many bits.
Change-Id: I2468c6a814964eb64a19d84c918d3a37c2494b66
Allocate memory from bufferpool for per-stream stats. No functional
change, but it allows sharing these between kernel and user space.
Change-Id: I370a49e1d94bb91c7fd0a2bc7d00ba65f99c4f6a
Distinguish between functions that enagage or disengage the recording
daemon and functions acting on actual recording, which eliminates the
need to deal with the flags separately.
Change-Id: Ia2d718d9e6f95d7621a2ba186c60b501f7404fe7