<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15651">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">core_unreal: Fix deadlock with T.38 control frames.<br><br>When using the ast_unreal_lock_all function no channel<br>locks can be held before calling it.<br><br>This change unlocks the channel that indicate was<br>called on before doing so and then relocks it afterwards.<br><br>ASTERISK-29035<br><br>Change-Id: Id65016201b5f9c9519a216e250f9101c629e19e9<br>---<br>M main/core_unreal.c<br>1 file changed, 6 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/51/15651/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/core_unreal.c b/main/core_unreal.c</span><br><span>index 653ef78..26369a5 100644</span><br><span>--- a/main/core_unreal.c</span><br><span>+++ b/main/core_unreal.c</span><br><span>@@ -682,6 +682,9 @@</span><br><span>                break;</span><br><span>       case AST_CONTROL_T38_PARAMETERS:</span><br><span>             parameters = data;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+          ast_channel_unlock(ast);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>           if (parameters->request_response == AST_T38_NEGOTIATED) {</span><br><span>                         struct ast_stream *stream;</span><br><span>                   struct ast_stream_topology *new_topology;</span><br><span>@@ -762,6 +765,9 @@</span><br><span>                      ast_channel_unlock(chan);</span><br><span>                    ast_channel_unref(chan);</span><br><span>             }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           ast_channel_lock(ast);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>             /* Fall through for all T38 conditions */</span><br><span>    default:</span><br><span>             res = unreal_queue_indicate(p, ast, condition, data, datalen);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15651">change 15651</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/+/15651"/><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: Id65016201b5f9c9519a216e250f9101c629e19e9 </div>
<div style="display:none"> Gerrit-Change-Number: 15651 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>