Remove the actual hash and just keep a linked list. Always move most
recently used entries to the front of the list, which also obsoletes
tracking the last used time stamp.
Change-Id: Id277499228b538dd013a4442e9b5c5a4d247ff15
The GLib slice allocator has been obsoleted. Having a mixture of two
allocators can lead to hidden issues on systems that use different
implementations. Take the leap and replace everything with g_new/g_free.
Change-Id: I025c8383ef47b2c2472573360407fd6a6ca339b3
Separate out the two distinct use cases of requesting a specific port,
and requesting (one or more) random ports.
Change-Id: Ifbe7725d8638d49f620c9f4b9445342d180c8770
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
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