<p>Ivan Poddubny has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/5926">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_queue: Fix returning to dialplan when a queue is empty<br><br>The fix for ASTERISK-25665 introduced a regression.<br>The return value of queue_exec used to be 0 in case of leavewhenempty<br>but it was changed to -1 (returned from wait_our_turn and passed<br>transparently by queue_exec), thus leading to hangup instead of returning<br>back to dialplan.<br><br>This commit resets the value back to 0 in this case, restoring<br>original behavior.<br><br>ASTERISK-27065 #close<br>Reported by: Marek Cervenka<br><br>Change-Id: Id9c83b75aeda463250155e88c5004be52bbca5ac<br>---<br>M apps/app_queue.c<br>1 file changed, 3 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/26/5926/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/apps/app_queue.c b/apps/app_queue.c<br>index b449263..ac4738f 100644<br>--- a/apps/app_queue.c<br>+++ b/apps/app_queue.c<br>@@ -8166,6 +8166,9 @@<br> } else if (qcontinue) {<br> reason = QUEUE_CONTINUE;<br> res = 0;<br>+ } else if (reason == QUEUE_LEAVEEMPTY) {<br>+ /* Return back to dialplan, don't hang up */<br>+ res = 0;<br> }<br> } else if (qe.valid_digits) {<br> ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITWITHKEY",<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/5926">change 5926</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/5926"/><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: Id9c83b75aeda463250155e88c5004be52bbca5ac </div>
<div style="display:none"> Gerrit-Change-Number: 5926 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Ivan Poddubny <ivan.poddubny@gmail.com> </div>