[asterisk-dev] [Code Review] Clean up AsyncAGI command loop.

Russell Bryant reviewboard at asterisk.org
Thu Apr 14 17:46:36 CDT 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1183/#review3371
-----------------------------------------------------------

Ship it!



/branches/1.8/res/res_agi.c
<https://reviewboard.asterisk.org/r/1183/#comment6958>

    Is there some way we could make sure this doesn't overlap with another return code?


- Russell


On 2011-04-14 17:09:15, rmudgett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1183/
> -----------------------------------------------------------
> 
> (Updated 2011-04-14 17:09:15)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> The AsyncAGI command loop is lax in the value it returns for the return status.
> 
> This patch does the following:
> 
> * Return correct status: SUCCESS/FAILED/HANGUP.  Previously, abnormal exits from the command loop such as hangup would return SUCCESS.
> 
> * The "asyncagi break" command now returns SUCCESS and is now the only way to break the command loop with that status.  Previously, it returned FAILED.
> 
> * The AMI event AsyncAGI End is no longer sent if the AsyncAGI Start event is not sent.  Previously, this happened because of an error setting up the AGI pipes.
> 
> * All executed AGI commands now get an AsyncAGI Exec result event.  Previously, if the command returned failure (because of hangup), the command loop just exited with FAILURE and did not send the AsyncAGI Exec result event.
> 
> * Makes sure that the channel frame queue is empty on hangup.
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/res/res_agi.c 313821 
> 
> Diff: https://reviewboard.asterisk.org/r/1183/diff
> 
> 
> Testing
> -------
> 
> Manually sent the following AGI commands from the CLI:
> wait for digit -1
> exec background tt-monkeys
> asyncagi break
> 
> Got the expected return values and bahaviour when executed or hungup while executed.
> 
> 
> Thanks,
> 
> rmudgett
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110414/8405df6d/attachment.htm>


More information about the asterisk-dev mailing list