[Asterisk-code-review] res pjsip session: Don't add declined stream if one does not... (asterisk[15])
Joshua Colp
asteriskteam at digium.com
Tue Sep 18 06:10:42 CDT 2018
Joshua Colp has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/72/10172/1
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: newchange
Gerrit-Change-Id: Ibb97d21cdeb87a8acae0c720861b0ff255708442
Gerrit-Change-Number: 10172
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180918/ed7d68f7/attachment.html>
More information about the asterisk-code-review
mailing list