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
For trickle ICE updates that need to be queued up, this requires storing
the unparsed SDP in the fragment object, and then doing the parsing when
actually processing the fragment.
This allows the call's memory arena to be used for parsing.
Change-Id: I28ed192c4443cedfa3095007cc8a555e3aa7a17a
In the header files follow the rules:
1. Firstly goes ifndef/define construction, then one empty row.
2. Secondly go system headers, so in angle-brackets, then one empty row.
3. If there are important pre-processor definitions, which affect
the following custom file headers, they are added next, then one empty row.
4. Thirdly custom header files, so in double quotes,
then at least one empty row.
5. If there is "xt_RTPENGINE.h", it's mentioned next, but separately,
then one empty row.
6. Then pre-processor definitions, and one empty row before the code.
In some situations it's allowed to step aside from the rules,
when inclusions are dependent on each other, so on specific sequence,
and also possibly on some inline objects definitions.
But, if possible to follow the rules, it should be done.
Change-Id: I6bec69b508653947c04e7785775373d21112eb58
Make it possible for a looper thread function to break out of the loop
by returning an appropriate status code.
Change-Id: I22e7789270eed4bf3340e7dae941929de58700ea
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
Defer handling of trickle ICE updates to the appropriate function, which
also handles queuing up the updates in case they're processed before the
call or call party has been fully created.
Change-Id: I2489cb0ee96fba35003765bbdd692f02caed7055
Move trickle ICE handling out of __media_init_from_flags and into a
higher-level function. This obsoletes the special magic return value to
indicate a trickle ICE failure.
All methods accepting trickle ICE updates must now explicitly call the
trickle ICE update function.
The requirement to have a full dialogue for trickle ICE updates is
removed as trickle ICE only affects one side.
Change-Id: I0850e1858876ca7bcdd39b7144b53b5a4afed53e
Moving code for handling (queuing, dequeuing) trickle ICE fragments into
ice.c, where it makes no sense. No functional changes.
Change-Id: Ib68f82e8d58efe066fdc48cd32ca9869cdeab846
Whether a bit-field is signed or unsigned is implementation specific, so
we should be explicit about this.
Change-Id: I744df3d24bc08e95fa816ba4135f19cd3a5dcb17
Warned-by: lgtm
stun.c: In function ‘stun_error_len’:
stun.c:388:62: warning: taking address of packed member of ‘struct header’ may result in an unaligned pointer value [-Waddress-of-packed-member]
388 | output_init(&mh, iov, &hdr, STUN_BINDING_ERROR_RESPONSE, req->transaction);
| ~~~^~~~~~~~~~~~~
stun.c: In function ‘stun_binding_success’:
stun.c:479:64: warning: taking address of packed member of ‘struct header’ may result in an unaligned pointer value [-Waddress-of-packed-member]
479 | output_init(&mh, iov, &hdr, STUN_BINDING_SUCCESS_RESPONSE, req->transaction);
| ~~~^~~~~~~~~~~~~
stun.c: In function ‘__stun_success’:
stun.c:540:42: warning: taking address of packed member of ‘struct header’ may result in an unaligned pointer value [-Waddress-of-packed-member]
540 | return ice_response(sfd, sin, attrs, req->transaction);
| ~~~^~~~~~~~~~~~~
stun.c: In function ‘__stun_error’:
stun.c:545:42: warning: taking address of packed member of ‘struct header’ may result in an unaligned pointer value [-Waddress-of-packed-member]
545 | return ice_response(sfd, sin, attrs, req->transaction);
| ~~~^~~~~~~~~~~~~
redis.c: In function ‘redis_hash_get_sdes_params.isra.0’:
redis.c:1095:39: warning: ‘_tag’ directive output may be truncated writing 4 bytes into a region of size between 1 and 32 [-Wformat-truncation=]
1095 | snprintf(tagkey, sizeof(tagkey), "%s_tag", kk);
| ^~~~
In file included from /usr/include/stdio.h:867,
from ../lib/str.h:9,
from ../lib/compat.h:16,
from ../include/redis.h:8,
from redis.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 5 and 36 bytes into a destination of size 32
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Change-Id: I214458fd3f596e565b1bba9d88808b7c99f9c876