Don't unsubscribe offer from its existing
subscriptions, because it may have multiple
branched receiver's monologues, and hence medias.
Change-Id: I5caf515f35688041b684fbea9bf05ae559d43e15
When calling `__subscribe_medias_both_ways()`,
add sender to receiver, and not the other way.
This is just for simplicity of code reading
(so kinda: from -> to).
Change-Id: I7df889b7744c1fc3c1bec5016adbe6924e5396c3
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
Make it so that options only need to be managed in one place, and all
code operating on the list of them is streamlined
Change-Id: Ia53b15910ec8973635e61cad1b43eff8d536a577
under normal circumstances, the rtp sink enters this function first
and updates the reti->local.family var to AF_INET so that when the
function is called for an rtcp sink, it exits the function early.
However, if media is being blocked the rtcp sink is the first to
enter the function and does so with a NULL payload type. this NULL
check is therefore required to prevent a sefgault on the call to `assert`.
closes#1876
Change-Id: Id95cbbc9ae388f50dd51417c351f4a9ba09eb5f0
If a monologue is determined to get a new to-tag, don't just overwrite
the previous to-tag, but also save the old one as an alias. Leave the
old one in the hash table as well so that future lookups can use either
to-tag.
Change-Id: I5d2d5cc17c85ec4ca2d8a20c501d2cdb6d793b61
The `if` block ends with a goto, so the indent for the `else` block is
not needed. Remove it for readability.
Change-Id: I0ab88246cfebf105c2256d129890925706917618
Previously there were explicit calls to fflush() in some code paths.
Replace with making the file fully unbuffered in case users depended on
this behaviour.
Change-Id: If49cf6135c0d9fe41c8896d4137e204da780be31
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
Add support for simplified G.107 formula, with math changed to
fixed-point. Retain legacy formula as an option for backwards
compatibility.
Change-Id: I999fc7de7be1407876c201c251538cea72b04008
Always create the offer/answer subscriptions during an offer/answer
exchange, making sure that no other offer/answer subscriptions can
exist.
Change-Id: I95e584c24e7ba74f2ead36d0c23976ef1f2e461c
Make sure stats are always added to the `delete` message.
Fixes stats being missing in case of `delete` without from-tag.
Change-Id: I635cc87b91d3e488696f33380b12dc68a24e51ad
The pcre2 API was changed from
pcre2_substring_list_free(PCRE2_SPTR *)
to
pcre2_substring_list_free(PCRE2_UCHAR **)
in 10.43. The difference is a `const` qualifier. Work around this.
Closes#1869
Change-Id: Ib3dd3003352f6c3155bb47d69ecb7a1b02f4647a
These functions expect a `rtpp_pos` argument, and while `str` is
compatible through the union, it lacks the second member of the struct,
which ends up uninitialised. Use the correct type through temporary
objects instead.
Change-Id: I0c553bdbb31c351346746b6072f2d424113bac5a
Don't proceed with the trickle updates in
case the required room, hence a call
hasn't been found.
Fixes Coverity Scan defect:
*** CID 1600057: Null pointer dereferences (NULL_RETURNS)
/daemon/janus.c: 1679 in janus_trickle()
1673 // ufrag can be given in-line or separately
1674 sp->ice_ufrag = cand->ufrag;
1675 if (!sp->ice_ufrag.len && ufrag)
1676 bencode_strdup_str(&ngbuf->buffer, &sp->ice_ufrag, ufrag);
1677
1678 // finally do the update
>>> CID 1600057: Null pointer dereferences (NULL_RETURNS)
>>> Dereferencing a pointer that might be "NULL" "call" when calling "trickle_ice_update".
1679 trickle_ice_update(ngbuf, call, &flags, &streams);
1680
1681 return NULL;
1682 }
1683
1684
Change-Id: Ib2e293c2f99e914e3d02fe43d08160ec30892ae4
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
Not needed any more. All strings reside in the call's memory arena, and
SDP rewriting isn't a thing any more.
Change-Id: I594b85fe26f44fa25312eb97fb65de238fc18920
Avoids allocating and duplicating the string. Should be safe as all
strings that use it are allocated in read-write memory.
Requires changing some struct members to non-const.
Change-Id: Idc81a84a1454898c76d8514666c385307043bb6f
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
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
If we remove a session that is not the session we're looking for
(re-used session ID after a removal race), we must return the incorrect
session to the hash table.
Change-Id: Iab73e1994251e5be766406b4e537a954b0e81f07
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
Use a BIO WRITE callback instead of BIO_read'ing from the BIO after each
operation. This is a more direct way to intercept data that needs to be
sent out.
Implement MTU-related BIO callbacks.
Deduct the assumed IP MTU overhead from the configured MTU during
startup.
Unlike the previous code, this does not necessarily send DTLS from the
same socket that received a message, nor to the same address that sent
one, and instead always uses the selected_sfd and ->endpoint. This may
or may not be a regression.
Closes#1806
Change-Id: I4d4456df3f378d00782cbfa64afdb2a038217e6c
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
Due to deprecation of the sdp_replace
approach just rework the `sdp_version_check()`
functionality as well as the `sdp_version_replace()` so,
that it complies with current state of things.
Chopper processing is not honored anymore.
Sessions parameter has been obsoleted, hence removed.
Change-Id: I4cee1e63c70e5ff5c3694d185a1bb841b5e6fa3a
Due to no usage just discontinue the following
functionality:
- `process_session_attributes()`
- `process_media_attributes()`
Change-Id: Ie1742aaa0155e27f94c72464d527c14c4cf03ee8
Discontinue `replace_sdp_media_section()` used before
to replace media sessions, also deprecate all subsequent
functionality:
- replace_network_address()
- synth_session_connection()
- replace_media_type()
- replace_media_port()
- replace_consecutive_port_count()
- replace_transport_protocol()
- replace_codec_list()
Change-Id: I0a455f6d105fa0a2ea61461ee92944ec990240ef
Move the SDP offer/answer model to the sdp_create
approach instead of using the sdp_replace one.
This assumes the SDP body including session level
attributes (s=, o=, t= etc.), as well as the media
attributes, are formatted using currently given
session context.
In other words, rtpengine collects all possible
information during all of the offer/answer exchanges
within the dialog, which in its turn affects each
monologue's context, from which each new SDP message
will be built up.
This approach replaces the older one, which instead
used to go through the currenty processed SDP and
just replace those attributes, that rtpengine
is required to affect, leaving the rest untouched.
Additionally: all of the existing offer/asnwer model
tests were fixed to comply with the currect change.
Most of it is just an offset of attributes, which are
stored a bit higher/lower within the same media or global
SDP session.
Also a good part of unit test fixes targets a move of
`c=` line from the session level to the media one (so
each media has from now on its own `c=` attribute). This
does discontinue a support for session level connection
information.
Change-Id: Iecb4739683d23c4f9341e8a34b71f8ca2070956c
For the sdp_create approach, currently given monologue
is actually the holder of `session_last_sdp_orig` for
currently processed direction of SDP preparation.
So this -> other, whereas other keeps the required last orig.
Change-Id: Id1bdb80ecc0401be5fd430cd4369b8588de4379b
Move the `sdp_manipulations_add()` func to work with
Gstring directly, instead of using the chopper object.
This will be needed later, when working with it
from behalf of sdp_create.
Change-Id: I2843aa0c97cb968adb450ca985efa6d7d9b2275e
When processing bandwidth attributes per session
level, always update them, independently if the
currently parsed value has been set => 0.
The problem is, that if we only set them,
when initialized to != -1, then every new offer
within existing dialog, will keep bandwidth set
for the monologue, even if the newer offer
doesn't set this anymore.
Change-Id: Ifef964798a8ce9b38a4fd5f26b5bb4d0678b8829
Because not specificially used in rtpengine,
just deprecate it. Not to be mixed with
the `label=xxx` usage via NG protocol.
This will be also required when switching to
the sdp create approach, because needs to be
delivered via generics to print out SDP.
No functional change. Tests had to be fixed accordingly,
because of the appeared offset in the list of attributes.
Additionally, tests containing coming SDP with a label,
but which are within inactive media, don't pass it further.
One single example of it is an answer case of "a=mid mixup" test.
This is because of `print_sdp_media_section()` specifics,
and only printing generics for active media sessions.
Change-Id: Iabb44adf17adb5d8e0c5bcad20f527b591b2222c
Add rtcp-fb attributes applied to all payload types
via generic attributes instead of using the chopper.
This will be required when switching to the sdp create
approach.
No functional change. Tests containing `*` payload type
had to be fixed accordingly, because of the appeared
offset in the list of attributes.
Change-Id: I9fc1d2faf578a3c533cd85e5e52afd4af2062149
The `med` is assigned to NULL, which however
doesn't serve any purpose. To fix this defect report,
just remove the redundant assignment.
Fixes the:
*** CID 1600020: Code maintainability issues (UNUSED_VALUE)
/daemon/call.c: 690 in __get_media()
684 med = g_hash_table_lookup(ml->media_ids, &sp->media_id);
685 if (med) {
686 if (med->type_id == sp->type_id)
687 return med;
688 ilogs(ice, LOG_WARN, "Ignoring media ID '" STR_FORMAT "' as media type doesn't match. "
689 "Was media ID changed?", STR_FMT(&sp->media_id));
>>> CID 1600020: Code maintainability issues (UNUSED_VALUE)
>>> Assigning value "NULL" to "med" here, but that stored value is overwritten before it can be used.
690 med = NULL;
691 }
692 if (flags->trickle_ice)
693 ilogs(ice, LOG_ERR, "Received trickle ICE SDP fragment with unknown media ID '"
694 STR_FORMAT "'",
695 STR_FMT(&sp->media_id));
Change-Id: I9871be9cab8928a8e5b6ad2a5e403b9ee3d44295
Add `break` statement. Fixes:
*** CID 1600019: Control flow issues (MISSING_BREAK)
/daemon/call_interfaces.c: 1162 in call_ng_flags_flags()
1156 out->strip_extmap = 1;
1157 break;
1158 case CSH_LOOKUP("symmetric-codecs"):
1159 ilog(LOG_INFO, "Ignoring obsolete flag `symmetric-codecs`");
1160 break;
1161 case CSH_LOOKUP("to-tag"):
>>> CID 1600019: Control flow issues (MISSING_BREAK)
>>> The case for value "155" is not terminated by a "break" statement.
1162 case CSH_LOOKUP("to_tag"):
1163 /* including the To tag in the delete message allows to be more selective
1164 * about monologues within a dialog to be torn down. */
1165 out->to_tag_flag = 1;
1166 case CSH_LOOKUP("trickle-ICE"):
1167 case CSH_LOOKUP("trickle-ice"):
Change-Id: I0195341ec70ea623ea7fece3782cfdc030ee4eaf
Add `call_ng_process_flags()` based parsing
as for other opmodes, like offer and answer.
This keeps the backwards compatibility with
the older "flags" parsing approach on the
module side, as well as adds the possibility
to parse rtpp-flags on the daemon side.
As an advantage, there is no need to use
specific local parsing for things like
to/from tags, call-id, delete-delay etc.
Additionally:
- this commit introduces flags-flags parsing
for the "fatal" flag.
However, as before is only taken into account
by the `call_delete_ng()` processing,
so no functional change.
- this commit introduces main-flags parsing
for the "delete-delay" flag, which is also
only taken into account by the `call_delete_ng()`
processing, so no functional change.
- this commit adds To-tag options flag prasing
into the `call_ng_flags_flags()` function,
and is used by `call_delete_ng()` specificially,
for cases when more specific identification of
monologues to be deleted is used.
Change-Id: Ia992e5375a2f86318d9ad193a7857dd589038eed
If both source and destination medias are non-RTP/non-SRTP,
then just consider it as pass through by default.
Change-Id: Id97a916ab236561e2ae776b54d89deae4da6f3ec
Add a function `sdp_out_original_media_attributes()`
which prints original attributes into the media, for
cases like MT_MESSAGE or ice force relay.
Change-Id: Ic5a3c1e4ed4a9ff3235fdf55252eba1e75c8381f
It's been noticed that trying to print a zero
conneciton address, on the media stream, which
actually offered non-zeroed IP source, but a
zero port, leads to a segmentation fault,
because it relies in this case on presented
`sockaddr_t` information, which is actually absent.
This happens only with sdp_create on offer/answer.
Test fixed is "a=mid on zero streams".
Change-Id: Ic2f7f671c9ded9b361d6467ca013698fdff28538
Look for the first usable (non-rejected, non-empty)
media and ps, thereby to determine session-level attributes,
if any. For that to work, it has to have `->selected_sfd`
of the packet stream.
Change-Id: Id4324864571bc78936aa16e235e3866e40860420
Remove print_sdp_media_section's dependency on sdp_media and instead use
a call_media object as source.
Change-Id: I0486b10590ae996da22822f57ec48110f4b88da1
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
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
Refactor the `sdp_out_add_other()` function to be compatible
with the sdp attribute manipulations.
Change-Id: I134b58c5126ff34804ebf9458faf8509250e097a
Because used only within daemon/sdp.c
makes no sense to keep it visible for other
files (even though there is no even
a declaration in the header).
Change-Id: Ifb4798aa713fec9f787f1422a15ea41ae6c5b190
For the `print_sdp_media_section()` change
parameter naming `message_setup` -> `sdp_create`,
so that other differentiations can also take place
in this function.
E.g. slightly different rtcp handling for the
sdp_create in comparison to the sdp_replace (because
no chopper based approach can be applied here).
Change-Id: I555e0ace04b384d6907f831c2a3de9a0b09777e4
Support session level group attribute
for the sdp_create approach.
Additionally: fix the `testVideoroomWebRTCVideo` test,
because as it turned out it used to lose the `a=group:`
attribute before.
Change-Id: I799dfe0dcc5e0708864150cd0e0262a61dd4cc05
Don't just set always to true (if media is active),
but check if it's a MESSAGE type, which is by default
inactive.
Change-Id: I492e6fb62acb6fb6a112353535171a22e93baf3f
For the `sdp_create` based approach, introduce
`a=setup:` handling in cases with the message media
type processing.
Currently this has to be divided for sdp_replace
and sdp_create users. This is because sdp_replace one
uses chopper based approach, which in combination with
changes in this commit dupplicates the setup attribute.
In order to separate the logic both approaches,
introduce a temporary bool, until the time when
sdp_replace gets fully deprecated.
A move of the check out of the `is_active` condition
is required, because the message media type isn't active
and hence has to be checked out of the active context.
Change-Id: I32b8f3f3928ba22e030ab5a6414b93fcd7c47201
When initializing a media for the other side (while
processing an offer), keep not only the `->protocol`
updated, but also the `->protocol_str`, so that this
can be usable while preparing an SDP for it.
Change-Id: I209b9048fae836903c9165c6b87682a06e77a744
Remove all codecs that cannot be transcoded to when the audio player is in
use.
Add safety to make_transcoder to return failure in case an unsupported
codec is requested for transcoding.
Convert leftover passthrough handlers to SSRC passthrough if there are
any (shouldn't be).
closes#1858
Change-Id: I1822e48723622d550624c7355a1acfbf8ca38eb8
Just keep the `s=` attribute empty, if it is
coming like that in the message being processed.
Current behavior of the sdp_create approach just
inserts the `rtpe_config.software_id`, which is wrong.
Change-Id: I1235081b90786f5d9480fd1cad9f2751c60e7720
Instead of setting it in two lines via temporary variable,
just negate it in one line for laconicity reasons.
Change-Id: Ie65d68ef5b8082f5de544ab2a9833a59d5e01d9a
Added support of the CT (conference total) bandwidth
attribute for the SDP session level. See RFC8866.
Will be required later for the SDP formatting in `sdp_create()`.
Change-Id: Ifc64f68d7acee8ce253882f4fa480bbf7ad7c0bd
Even if the media isn't accepted, still check for the mid
presence and add it, if required. This is the only attribute
to printed, for the media which wasn't previously accepted
(so 0 port added for it).
See: #1361 and #1362.
Change-Id: Ib92930d6e1ec4dfe526fa18869c5f7a8e17f6a4f
Move handling of the usual `m=` line, so printing
of: media type, port, protocol (e.g. RTP/SAVP),
to a separate function to make the `sdp_create()`
implementation be more laconic for reading.
This function is a default alternative for the
`sdp_out_add_osrtp_media()`.
No functional changes.
Change-Id: I469abbbf6e203d2cc655a26bbf44ff3c7a66b1df
Move a check that port isn't 0 to the function itself,
instead of checking each time before calling the func.
Change-Id: Iec43770fc0f5846c63f6e11d8c2dfb2be135aec6
Make the `sdp_create()` implementation be more laconic,
and move the OSRTP related handling into separate funcs:
- `sdp_out_handle_osrtp1()`
- `sdp_out_handle_osrtp2()`
Just refactoring, no functional changes.
Change-Id: Ib3c5f58d215ea3e0622d328656d82919dfa391c5
Move printing of other session level attributes (so taken
from the coming SDP and to be carried out to the outgoing one)
to a dedicated function `sdp_out_add_other()`.
No functional change.
Change-Id: I94713545e7610d74d36a6a5f3027c64407c6750c
Add a function to handle other non specific attributes
for the session level.
E.g.: ice-lite or anti-looper (rtpengine).
Change-Id: I147403ff9e3c3ff8be6718b8b118e405442a9220
In case when the `packet_stream`, selected via the
media being iterated, has no `->selected_sfd`,
just set the port value to 0.
Also skip adding any further attributes, like
connection information or any other, since
this media by fact is not accepted.
This is a usecase for OSRTP related scenarios,
where RTP media session can have 0 port set.
Change-Id: I7784b80e7d51d19106ea30db585143375a5ba050
... so that the desired wav channel can be controlled when producing a
mixed audio file
When a mixed wav file is created, the channels in the wav container are
currently allocated in the same order as each SSRC is received, meaning
it is impossible to know which channels have been allocated to the offer
or answer side of the call. Furthermore if there is a reinvite or media
file played, these are also allocated in the order that SSRC is received
- so an "answer" could end up sharing a channel with an "offer" with no
way of knowing this.
This patch allows you to specify how many channel slots should be
allocated within the mixer, and allows you to then specify which slot is
assigned to each media in the call (this will usually be 2 slots in
total, slot 1 for answer, slot 2 for offer or vice versa).
Ported from https://github.com/sipwise/rtpengine/pull/1852Closes#1857Closes#1852
Change-Id: I010208427cabc3a48d6ef7bd3a84e9a5bdcfd492
If a stream has been pushed to the kernel from anything other than RTP,
even though RTP is expected, we get a forwarding entries without any
SSRCs. This is valid, but once actual RTP is received, it needs to be
passed on to user space, so that SSRC contexts can be set up.
Possible fix for #1855
Change-Id: I51b82d3cf79cf66780fdde154bebe56e0f43174b
Move printing of attributes to a separate func,
in order to be able to re-use this print during
the same media section iteration (e.g. with OSRTP).
Later on this func is to be merged with the
`print_sdp_media_section()` function, after
the sdp_replace is fully deprecated.
Change-Id: I15825ed6eecb450b742b31677961fd8ddbf950fb
If there are no more tokens, instead of returning a null string as
remainder, set the remainder to the end of the original string with a
zero length.
Update two places in the code where this makes a difference.
Change-Id: I137fbce3e7d88ccba65f6b23a36aa1dfbbd3867e
The subscriptions must be removed first and the update function must be
called second. Otherwise unsubscribe doesn't have any immediate effect.
Closes#1851
Change-Id: Iccc449357f7136b863ba2d633b24942dbe87d767
Added support of the AS bandwidth attribute for the
SDP session level. Will be required later for the SDP
formatting in `sdp_create()`.
Change-Id: I1bde4659679de6e60bdad12c0578ced2c1983300
Independently from the fact if a monologue already
has the `->session_sdp_orig` object set, update it
accordingly to the latest origin taken from
the currently processed SDP.
In this case such option flags as `replace_origin`,
`replace_origin_full` or `force_inc_sdp_ver` are
ignored, because their handling is covered using
the `->session_last_sdp_orig` object.
Change-Id: Ib845d185a03a2cb99ead5f6039342388c461cee2
Same as ptime but for the maxptime.
Also add replication of it.
This is required later to be used for the sdp_create() handling.
Additionally: fix tests, because maxptime now takes another
place within the media session, which doesn't affect functionality.
Change-Id: I058e35323849679976c60b2e9fb2555fd0168e67
Already checked before in sdp_version_check.
Fixes defect:
/daemon/sdp.c: 2936 in sdp_version_replace()
2930 /* update string unconditionally to keep position tracking intact */
2931 chopper_replace(chop, &origin->version_str, &origin->version_output_pos, version_str, version_len);
2932 }
2933 }
2934 /* for sdp_create */
2935 else {
>>> CID 1598877: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "src_orig" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
2936 if (!other_orig || !src_orig)
2937 return;
2938
2939 other_orig->version_num = src_orig->version_num;
2940 /* is our new value longer? */
2941 if (version_len > other_orig->version_str.len) {
Change-Id: I068a13ccc454fd61600546d05c78bde979203fc7