<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/10172">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_session: Don't add declined stream if one does not exist.<br><br>Given a scenario where a session refresh was done with a removed<br>stream we would always add a removed stream to the outgoing SDP<br>even if one did not already exist.<br><br>This change makes it so that a removed stream is only placed into<br>the SDP if one already exists.<br><br>ASTERISK-28047<br><br>Change-Id: Ibb97d21cdeb87a8acae0c720861b0ff255708442<br>---<br>M res/res_pjsip_session.c<br>1 file changed, 5 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/72/10172/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c</span><br><span>index 1f9a382..68dcf06 100644</span><br><span>--- a/res/res_pjsip_session.c</span><br><span>+++ b/res/res_pjsip_session.c</span><br><span>@@ -1573,6 +1573,11 @@</span><br><span> </span><br><span>                           /* No need to do anything with stream if it's media state is removed */</span><br><span>                          if (ast_stream_get_state(stream) == AST_STREAM_STATE_REMOVED) {</span><br><span style="color: hsl(120, 100%, 40%);">+                                       /* If there is no existing stream we can just not have this stream in the topology at all. */</span><br><span style="color: hsl(120, 100%, 40%);">+                                 if (!existing_stream) {</span><br><span style="color: hsl(120, 100%, 40%);">+                                               ast_stream_topology_del_stream(media_state->topology, index);</span><br><span style="color: hsl(120, 100%, 40%);">+                                              index -= 1;</span><br><span style="color: hsl(120, 100%, 40%);">+                                   }</span><br><span>                                    continue;</span><br><span>                            }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10172">change 10172</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/10172"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ibb97d21cdeb87a8acae0c720861b0ff255708442 </div>
<div style="display:none"> Gerrit-Change-Number: 10172 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>