[Asterisk-code-review] res pjsip session: Don't add declined stream if one does not... (asterisk[15])
Joshua Colp
asteriskteam at digium.com
Wed Sep 19 08:42:29 CDT 2018
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/10172 )
Change subject: res_pjsip_session: Don't add declined stream if one does not exist.
......................................................................
res_pjsip_session: Don't add declined stream if one does not exist.
Given a scenario where a session refresh was done with a removed
stream we would always add a removed stream to the outgoing SDP
even if one did not already exist.
This change makes it so that a removed stream is only placed into
the SDP if one already exists.
ASTERISK-28047
Change-Id: Ibb97d21cdeb87a8acae0c720861b0ff255708442
---
M res/res_pjsip_session.c
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Joshua Colp: Approved for Submit
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index 1f9a382..68dcf06 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -1573,6 +1573,11 @@
/* No need to do anything with stream if it's media state is removed */
if (ast_stream_get_state(stream) == AST_STREAM_STATE_REMOVED) {
+ /* If there is no existing stream we can just not have this stream in the topology at all. */
+ if (!existing_stream) {
+ ast_stream_topology_del_stream(media_state->topology, index);
+ index -= 1;
+ }
continue;
}
--
To view, visit https://gerrit.asterisk.org/10172
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb97d21cdeb87a8acae0c720861b0ff255708442
Gerrit-Change-Number: 10172
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180919/da3ddef6/attachment.html>
More information about the asterisk-code-review
mailing list