]> git.ipfire.org Git - thirdparty/asterisk.git/commit
app_queue: Fix returning to dialplan when a queue is empty
authorIvan Poddubny <ivan.poddubny@gmail.com>
Tue, 27 Jun 2017 09:37:11 +0000 (11:37 +0200)
committerIvan Poddubny <ivan.poddubny@gmail.com>
Thu, 29 Jun 2017 14:51:18 +0000 (09:51 -0500)
commit5563613abdfa107a992d0862e5a7e48b3fda7917
treeeaf2bc1f4123d6e20a7418bbd06cd2d4101b0f45
parent2c3d589128cee2bc3e756c9dfcd66a9818434ef6
app_queue: Fix returning to dialplan when a queue is empty

The fix for ASTERISK-25665 introduced a regression.
The return value of queue_exec used to be 0 in case of leavewhenempty
but it was changed to -1 (returned from wait_our_turn and passed
transparently by queue_exec), thus leading to hangup instead of returning
back to dialplan.

This commit resets the value back to 0 in this case, restoring
original behavior.

ASTERISK-27065 #close
Reported by: Marek Cervenka

Change-Id: Id9c83b75aeda463250155e88c5004be52bbca5ac
apps/app_queue.c