<p>Thomas Guebels has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8262">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/62/8262/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 263dbff..76f5b09 100644<br>--- a/res/res_rtp_asterisk.c<br>+++ b/res/res_rtp_asterisk.c<br>@@ -1011,6 +1011,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/8262">change 8262</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/8262"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </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: 8262 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Thomas Guebels <tgu@escaux.com> </div>