<p>Thomas Guebels has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8264">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_rtp_asterisk: Fix ICE candidate nomination<br><br>If the ICE role is not set right away, we might have a role conflict<br>that stays undetected and ICE finishing with successful tests and no<br>candidate nominated. This was introduced by ASTERISK-27088.<br><br>To avoid this, we set the role as soon as before but only if the ICE<br>state permits it: still checking and not yet nominating candidates or<br>completed.<br><br>ASTERISK-27646<br><br>Change-Id: I5dbc69ad63cacbb067922850fbb113d479bd729c<br>---<br>M res/res_rtp_asterisk.c<br>1 file changed, 9 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/64/8264/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c<br>index 913fbad..d3273b4 100644<br>--- a/res/res_rtp_asterisk.c<br>+++ b/res/res_rtp_asterisk.c<br>@@ -1036,6 +1036,15 @@<br>     }<br> <br>  rtp->role = role;<br>+<br>+      if (!rtp->ice->real_ice->is_nominating && !rtp->ice->real_ice->is_complete) {<br>+              pj_thread_register_check();<br>+<br>+               pj_ice_sess_change_role(rtp->ice->real_ice, role == AST_RTP_ICE_ROLE_CONTROLLED ?<br>+                      PJ_ICE_SESS_ROLE_CONTROLLED : PJ_ICE_SESS_ROLE_CONTROLLING);<br>+ } else {<br>+             ast_debug(3, "Not setting ICE role because state is %s\n", rtp->ice->real_ice->is_nominating ? "nominating" : "complete" );<br>+   }<br> }<br> <br> /*! \pre instance is locked */<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8264">change 8264</a>. To unsubscribe, 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/8264"/><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: I5dbc69ad63cacbb067922850fbb113d479bd729c </div>
<div style="display:none"> Gerrit-Change-Number: 8264 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Thomas Guebels <tgu@escaux.com> </div>