<p>Robert Cripps has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15230">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res/res_pjsip_session.c: Check that media type matches in<br>function ast_sip_session_media_state_add.<br><br>Check ast_media_type matches when a ast_sip_session_media is found<br>otherwise when transitioning from say image to audio, the wrong<br>session is returned in the first if statement.<br><br>ASTERISK-29220 #close<br><br>Change-Id: I6f6efa9b821ebe8881bb4c8c957f8802ddcb4b5d<br>---<br>M res/res_pjsip_session.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/30/15230/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 34bd597..eb1233b 100644</span><br><span>--- a/res/res_pjsip_session.c</span><br><span>+++ b/res/res_pjsip_session.c</span><br><span>@@ -497,7 +497,7 @@</span><br><span> */</span><br><span> if (position < AST_VECTOR_SIZE(&media_state->sessions)) {</span><br><span> session_media = AST_VECTOR_GET(&media_state->sessions, position);</span><br><span style="color: hsl(0, 100%, 40%);">- if (session_media) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (session_media && session_media->type == type) {</span><br><span> SCOPE_EXIT_RTN_VALUE(session_media, "Using existing media_session\n");</span><br><span> }</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15230">change 15230</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/c/asterisk/+/15230"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I6f6efa9b821ebe8881bb4c8c957f8802ddcb4b5d </div>
<div style="display:none"> Gerrit-Change-Number: 15230 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Robert Cripps <rcripps@voxbone.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>