Resolve file name conflicts between different components
Ensure shared log levels are identical across components
Encapsulates lib/*
Change-Id: If848d6fa0e4cd8eac88ce9e63ee77fc5a7a481fd
Comparing the `unsigned int` against -1 leads
to comparison of the maximum value representable by unsigned int
(UINT_MAX).
Use explicitly the `UINT_MAX` instead.
Change-Id: Ib1e435c25d481ae680fd3d3f3cb74ec1c7d6109d
Not only the `.name` and `.value` but also the rest
(so the `.line_value` and `.key`).
If not to do so, this may affect future generic logic.
Change-Id: I786aa52233af6bf4324ed401873df42fc7f63c46
If `a=` has been given as part of the manipulation flags,
then this would lead to appending `a=a=`, so instead check it,
and if already there, then skip adding our own.
Change-Id: If943fac403fc3942cad8ad89be14fe4689b9974e
Add assert for the case when the execution sequence:
`get_any_interface_address()` -> `get_interface_address()`
still returns NULL.
If to dereference the `local_intf` later without checking it,
then it's definitely a crash.
Change-Id: Idc8557dd5352a6a421ca4056ef1ebd822be5fe08
For the case when we fail in during streams allocation
in `sdp_streams()` we only take care to clean the
main pointer for the stream params, but not about
the subsequent heap allocated stuff like SDES params.
For this purpose we actually have `sp_free()` which takes
care to de-allocate subsequent heap allocated queues.
Change-Id: I326bc91c9194752e901406dc919da9c4ef5aa51a
In `sdp_out_add_media()` the port is given as
`unsigned int` but then is being appended to the SDP body
as `%i`. Instead the `%u` should actually be used.
Same for the `sdp_out_add_osrtp_media()` which treats
the `unsigned int` as the `signed` one actually.
Change-Id: I6a7a45e9a0daa70ffffd17d2a35ff7db8c8cf7ab
Move o= replacement logic into sdp_out_add_origin. Copy fields from
input source ML if present, or keep unchanged. Generate if not present.
Change-Id: Ieea5abea05bf076262248639118e9e9192f77e1c
This is needed to correctly print media labels for SIPREC in case the
input SDPs already had media labels.
Change-Id: I021f44ba28a3648ceb62db12425ddf545de42a96
Fixes:
../lib/loglib.h:54:17: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]
54 | __ilog(prio, "[%s] " fmt, log_level_names[system], ##__VA_ARGS__); \
| ^~~~~~
sdp.c:613:21: note: ‘err’ was declared here
613 | const char *err;
| ^~~
sdp.c:734:9: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]
734 | ilog(LOG_ERROR, "Failed to parse a=crypto attribute, ignoring: %s", err);
| ^
sdp.c:613:21: note: ‘err’ was declared here
613 | const char *err;
| ^
Change-Id: I18c3c1d6f2d6d5643a61ef864116e1f3d5e1db95
Add `EXTRACT_NETWORK_ADDRESS_ATTR`
for proper error alias handling,
otherwise just quits with no attr type change.
Change-Id: Iacea9350503b68962a3c233df9126102b67d3b8b
If dummy definition with no tag, algo etc.
just ignore it, otherwise not excluded
and is dangling in outgoing SDP.
Also add according test.
Change-Id: Ib7c981ee66b1ce8cb363a9cc181231c68baa69cd
A simple mechanism to track whether a given media endpoint has been
advertised to the public. If it hasn't, then any media received on it is
considered suspicious, and source addresses are ignored for learning
purposes.
Change-Id: I76a08e3f442f263dad192ff496a5d734a9349d26
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
Protects against double MoH played,
e.g. when inadvertently two rtpengine instances try to trigger MoH.
This gives a clue to the current rtpengine instance,
that another one already started MoH for this call.
By default is set to false.
Change-Id: I7cc36a177b0ce1bdb64ff8b42bf31f13fb1e4c91
Use the correct media object (the source media) to obtain media-level i=
lines from. Adapt OSRTP output function to do the same.
Change-Id: I9ba4db286cf9d822b8986a7da2cb4f4aa1c69646