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
Grab source monologue and source media only once, and pass the object
down to the various functions, instead of doing the retrieval several
times in multiple places.
Change-Id: I88d019dbf9493fa0037161390fdb9efda58f5441
We know whether we're printing for monologues or for medias, so there's
no need to have a generic function signature.
Change-Id: I356747686adb34c19ba2ba4c77c2d0a77b85a364
When MoH is triggered with `sendrecv` flag (so that
the recipient, the one who is put on hold, sees
the sendrecv state instead of sendonly/inactive),
we have to correctly process the answer coming back
to the MoH originator.
The originator of MoH must see:
- recvonly to his sendonly
- inactive to his inactive
Hence OA model is kept correct for the originator's leg.
Additionally: accordingly correct MoH tests.
Change-Id: Ida5f074d302c419c1e57e4fd624a55bfddae5587
Mark those SDPs which trigger processing
of music-on-hold.
Is defined by the config option:
`moh-attr-name`. If not defined then
is not used.
Will be useful for cases when it's important
for remote components to detect ongoing hold.
Change-Id: I0f2a284955dbc045b51920174f1f4fbefcb93907
Use an object with local storage for sdp_address instead of just setting
a pointer. This makes it possible to put a different address.
Change-Id: I92e69b6a9eba9d0caa3853b3dcb134951d76b145
There is enough overlap between the two enums that it doesn't make sense
to carry along both. Unify.
Change-Id: I9de8fbdb8d78a2002d8c1b62cea57188c937d61d
Don't add session level bandwidth for subscribe requests,
because it's anyway mixing different medias from all parties
in one SDP and cannot really apply session level (so global)
bandwidth taken from one of the medias, to all medias.
Change-Id: If8fb5358cdae897ca811a3bd565d8be055e2101e
Re-move misleading log line to another place.
In the `sdp_manipulate_remove()` function:
- true - means remove
- false - means don't remove
Correct logging accordingly.
Change-Id: I3e0c08552a0192f3985da990b5f0c96cc31ece94
Convert existing sdp manipulation helpers
to work with arrays directly, independently from
which array is actually given.
Moreover, don't use the `G_N_ELEMENTS()`,
since we already have the `__MT_MAX`
as the size of the array, so we can directly use
that instead of relying on the G_N_ELEMENTS macro
(for array size checks).
Change-Id: I38e71dab30a467b933c213c8157fa06651ebaf04
Add a getter function for retrieval of top
most media from given media.
Currently existing getter for the top most
monologue's media subscription, just rename
so it makes more sense and is better to
differentiate:
`call_get_top_media_subscription()` -> `call_ml_get_top_ms()`
Change-Id: I5bf13b69b4d5f67cd6b53018b5a16d759542cd41
0f9dd5def2 introduced this check for `source_media`
which was only in use by `sdp_replace()` functionality.
`sdp_create()`'s one never really reaches it, even
in older implementation where `handle_sdp_media_attributes()`
was used.
So for now it has no use, just remove it.
Fixes:
*** CID 1600058: Control flow issues (DEADCODE)
/daemon/sdp.c: 2690 in print_sdp_media_section()
2684
2685 /* print sendrecv */
2686 if (!flags->original_sendrecv)
2687 append_attr_to_gstring(s, sdp_get_sendrecv(media), NULL, flags,
2688 media->type_id);
2689 else if (source_media)
>>> CID 1600058: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "append_attr_to_gstring(s, s...".
2690 append_attr_to_gstring(s, sdp_get_sendrecv(source_media), NULL, flags,
2691 media->type_id);
2692
2693 ps_rtcp = print_rtcp(s, media, rtp_ps_link, flags);
2694
2695 if (proto_is_rtp(media->protocol)) {
** CID 1600057: Null pointer dereferences (NULL_RETURNS)
Change-Id: I2d2ffbb0c9ecc0fae8890367754fbbd6e79e9c21
Use provided macros for initrialise str objects everywhere instead of
manually setting .s and .len. This allows for flexibility to extend str
objects.
Change-Id: I5ebca0bc82b348301c2c8e94b974c7acbf249b82
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
Flag the media via stream params, when it's
trickle or non-trickle offer/answer, and,
unflag it always only when it's non-trickle.
Change-Id: Ia85ce5792684a4121e224aff1a8e941e061fe5a8
The OTHER type attributes are not used outside of sdp.c. Move the
definitions into the appropriate scope.
Rename fields to be consistent with other attributes.
No-op.
Change-Id: Id92f2df2f475db92ee5ae1f3474191266d6d196d
Refactor inactive streams handling (non-accepted media) so,
that they get also labels being printed.
Change-Id: I6627aba77a5f391f797762202eb4f0977bc0fc4a
Just remove them and re-write commentaries so,
that they make sense taking into account we don't use
the chopper anymore.
Change-Id: I60254061d6d2a7c7b1b181c288144e27b8d2c6b5
Because currently it is directly handled by the
`generic_append_attr_to_gstring()` implementation, a couple
of functions (previously used by the sdp_replace)
are from now on obsolete and not needed anymore:
- `sdp_manipulations_subst_attr()`
- `sdp_manipulate_remove_attr()`
Just remove them.
Change-Id: Ia33218fa4c144812ff3265abafb62fd7f50f6955
Instead of returning a pointer to ps, just return void,
because previously used pointer (by sdp_replace) is
not used by any other function.
Change-Id: If2e211b98ab801061f40210b571804ff8184124f
Move content of the `handle_sdp_media_attributes()` function
into the `print_sdp_media_section()` function. With all required
refactoring. No functional change.
Change-Id: Ia1e5019165a4ea281f17ac8df712701eea772155
From now on inactive medias are handled in advance
by `handle_sdp_media_attributes()`, so all non-accepted medias
are alsways caught here and never deal with
`print_sdp_media_section()`.
Hence, deprecate `is_active` bool for it and refactor the
implementation of `print_sdp_media_section()`.
Change-Id: Ief7b1de204681373660c74c71c972b289216015c