Complete overhaul of the codec handling code:
*) obsolete flags `asymmetric codecs`, `symmetric codecs`, `reorder
codecs`
*) support proper codec offer/answer
*) split codec manipulation (strip/offer/accept/etc) into separate
functions for clarity and better code maintenance
*) fully update codec handlers in both directions after an answer
*) explicit allocation and handling of codecs and payload types in a
codec_store object
*) improve codec matchup logic during answer
*) more explicit handling of supplemental codecs (CN/DTMF)
*) remove now obsolete hacks for handling certain use cases
Change-Id: I996705ba8fe339524c2f70e6bb0fd854f9a1f4fb
This solves problems when the same SSRC is looped through the same call
multiple times in different mono/dialogues, with different parameters.
Change-Id: I1d033cb1f012574d82b5bcbfffe11eb5f983cfd8
This makes the type in line with string(3) functions and eliminates some
compiler warnings.
Also update the related bencode data type.
Change-Id: I7ef4024f4b5a0f737b3dbe03bcd078032395bce6
Initially created branches don't have a tag associated with them, so
they don't appear in `other_tags`. We need to keep track of which
branches were created from a single from-tag through their via-branch
values so we know when all branches have been deleted.
closes#1037
Change-Id: I4c6ce602b99a9104de98098cd06ca399eb28e1b2
Commit a6d2f9296 introduced usage of libevent_global_shutdown(),
which is available in libevent-dev >=2.1.1-alpha only.
For example travis CI is running Ubuntu 16.04 / xenial and ships
libevent-dev 2.0.21-stable-2, so we can't just raise the
build-dependency of libevent-dev to >= 2.1.1+ if we still want
to support older systems.
Change-Id: I9dcf9ca0a19f59051d42f0d2383d1938b60a97df
fix cleanup being skipped on redis slaves
fixes an SDES related Redis mem leak
adds a hash for the ports free list to avoid duplicate entries
fixes#898
Change-Id: I34aad67290ff5ef8824142682aac03cb600d0ecb
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
We need to set the redis context to NULL after freeing it, otherwise
other code will try to free it again, which will make the program
abort when exiting.
Change-Id: Id634075344351eb1c924c59739b72bbf57de3c89
We should offer all crypto suites that we support. If passing through
SDES, we should amend the list of crypto suites with all additional ones
that we support that weren't included in the received offer.
closes#577
Change-Id: I9b6c16e8eadecf01cdbc8043bd8361e0f683e456
Instead of just remembering the last seen RTP payload type, this adds a
tracker that keeps track of the last 32 seen payload types and keep the
list in order of how often each type was seen.
Change-Id: I062a43b7bfc9413b755dca548d72953ff8245477
Force re-checking of the synchronous redis context state in case of processing
a redis notification. It is possible that redis async context is up while the
blocking one is down.