There is enough overlap between the two enums that it doesn't make sense
to carry along both. Unify.
Change-Id: I9de8fbdb8d78a2002d8c1b62cea57188c937d61d
Instead of keeping one global hash/list of all received ICE fragments,
indexed by string call ID and from-tag, move the hash/list of ICE
fragments into the call object, now indxed only by the from-tag.
This requires a call object to exist before an ICE fragment can be
stored. Change the order of operations to always create a call object
first, then parse the SDP, then check for ICE fragment processing. The
determining factor now is only whether the monologue exists.
Duplicate the raw SDP into the call's memory arena instead of onto the
heap.
ICE fragments now don't need to store the pre-parsed SDP any more, and
the trickle ICE handling code is guaranteed to always have the fully
parsed SDP information.
Strings for fragment indexes can now be allocated from the call's memory
arena.
Obsolete the extra thread used to delete old ICE fragments. This is now
done in-line with regular call timeout processing.
Change-Id: I7acbc4c52666c4cdf1c02324bf33cf0bfcb4f0d0
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
If multiple pollers are in use, use a single poller per call instead of
assigning pollers round-robin to each socket used in the call.
Change-Id: Iec49bd9d2fbd75d947d6232bcccfdfe87c4c6d7c
The poller-per-thread feature was broken with a division by zero. Take
the opportunity to rework it and eliminate the poller_map object. Use a
simple array of pollers for media sockets, plus one global poller for
control sockets. In the regular case only one poller is created and
everything points to that poller. In the poller-per-thread case, one
poller per thread is created, plus one poller (also with its own single
thread) for control connections. All control sockets use the single
control poller, while all media sockets get assigned one poller from the
pool in a round-robin fashion.
closes#1801
Change-Id: Iae91a3e10b7206455c6df33b1a472254c700ce21
Graphite isn't able to deal with spaces in the metric names delivered to
it. Introduce special version of the command strings with spaces
replaced by underscores.
closes#1780
Change-Id: Ie8bcec5ca4f2d427e92901f6fa76b985df6e459e
With the "foreign" flag now stored in call_flags, restoring a call from
Redis restores this flag as well, overwriting the desired flag as we had
set it through call_get_or_create().
Reverse the flag setting by taking it out of call_get_or_create() (where
it's always false anyway, except when coming from Redis) and setting it
explicitly with call_make_own_foreign() after restorting call and its
flags.
Change-Id: Ib68be2aeedfa988b7555e426fa337657e1062245
Convert each listener entity into a list.
Support a list of values for each option so that multiple
ports/addresses can be listed.
Keep previous behaviour unchanged: If ANY address is given, open
listeners for IPv4 and IPv6.
Change-Id: Ic54f28d1262f60d5e5c9d824a95e7c33ebc2aba9
Move the `ice_slow_timer()` functionality to a separate thread,
so that we do the work more efficiently, and not be dependent
on the call_timer runs by poller.
Furthermore it makes more sense to keep in the `ice.c`,
since it obviously has to do with ice timing.
Additionally:
Update the test-stats due to these changes in the `call_timer()`
We have to call the `ice_slow_timer()` now explicitely from
the test-stats.c, because the `call_timer()` is not anymore
responsible for providing stats counters rate calculations.
Change-Id: I03377dd59ea71c27497e1f4d30164075f05165cd
Similarly as for the `stats_rate_min_max()`,
move the `stats_counters_calc_rate()` functionality
to the same separate thread, so that we do the work
more efficiently and not be dependent on the call_timer
runs by poller.
Furthermore it makes more sense to keep in the `statistics.c`,
since it obviously has to do with statistics.
Additionally:
Update the test-stats due to these changes in the `call_timer()`
We have to call the `stats_counters_calc_rate()` now explicitely from
the test-stats.c, because the `call_timer()` is not anymore
responsible for providing stats counters rate calculations.
Change-Id: I1682eb76e3057f0f431c27b9633717d965313a1a
We have to call the `stats_rate_min_max()` now explicitely from
the test-stats.c, because the `call_timer()` is not anymore
responsible for providing call rate stats.
Change-Id: Id896ac086660a94b8d1d6fe520b1aa68791cd351
Moving code for handling (queuing, dequeuing) trickle ICE fragments into
ice.c, where it makes no sense. No functional changes.
Change-Id: Ib68f82e8d58efe066fdc48cd32ca9869cdeab846
There's no point in sampling Graphite-specific stats, nor in reporting
them out, if Graphite is not enabled.
Change-Id: If8014513832485f38d81b478c695391129c21dff
Distinguish between two different types of "gauge" type metrics: Actual
gauges which (at least conceptually) have a single continuous value, and
metrics which are comprised of discretely sampled values, possibly from
multiple sources.
Real gauges with continuous values don't have mean/average/deviation
values directly associated with them, as calculating these requires
sampling or some other analysis.
Sampled metrics on the other hand do have these associated values.
Clarify which function does what and where each value comes from.
Change-Id: Iff5dd844b70ff70979b1b8c84dc7734d44b3da20
Rename structs and variables to make it clear that these min/max values
are min/max per-sec rate values.
Carry mins and maxes separately from averages. This changes the meaning
of $command_ps_avg away from an "average of averages" to an actual
average, which is more accurate.
Calculate this average based on per-interval differences and interval
duration (stats_rate_min_max_avg_sample).
Side effect: As rtpe_latest_graphite_interval_start is now set in
print_graphite_data instead of in graphite_loop_run, the test now
reports a different "interval calls duration".
Change-Id: I67b1118c18ca2464a48c4836fca3cfdb4d53c898
Handling of dual stack v4/v6 was previously done by the individual
listener objects for INADDR_ANY listening addresses. If listening on
INADDR_ANY was requested, then each listener would create two instances,
one for IPv4 and one for IPv6. This works fine for INADDR_ANY but fails
for listening on host names that resolve to multiple addresses, such as
`localhost`.
Solve this by relieving the listener objects from handling this and
instead handle it in the code setting up the listeners. If a host name
resolves to multiple addresses, then set up multiple listeners (up to
two supported currently). This allows us to listen on `localhost` by
default and have both 127.0.0.1 and ::1 active. INADDR_ANY is handled
specially by also setting up :: in that case.
Change-Id: I2a1e1d7090d7d23863c7a9bb1e89b85ad2ea44f4