[asterisk-dev] [Code Review] app_read does not break from prompt loop with empty string
Russell Bryant
russell at digium.com
Tue Mar 3 13:59:55 CST 2009
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/177/#review505
-----------------------------------------------------------
Ship it!
Other than these last changes, it looks fine to me.
/trunk/include/asterisk/channel.h
<http://reviewboard.digium.com/r/177/#comment1167>
I would put this in app.h, so that it goes with the ast_app_getdata() API call. Also, you should change the return type on ast_app_getdata() to be this enum.
For the comment you have in here, use /*! ... */. That special formatting will let doxygen pick it up.
/trunk/main/app.c
<http://reviewboard.digium.com/r/177/#comment1168>
Change the return type on ast_readstring(), as well.
- Russell
On 2009-03-03 11:20:52, David Vossel wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/177/
> -----------------------------------------------------------
>
> (Updated 2009-03-03 11:20:52)
>
>
> Review request for Asterisk Developers and Russell Bryant.
>
>
> Summary
> -------
>
> ignore the last description parts of it were wrong.
>
> When multiple ampersand-delimited prompts are passed to app_read, pressing # (without pressing other DTMF keys) merely cycles through the prompts until it reaches the last one. Then it will *finally* skip that prompt and return to the dialplan. It would be nice if # returned to the dialplan immediately without cycling through the rest of the prompts.
>
> In app.c, ast_app_getdata is called to stream the prompts and receive DTMF input. If ast_app_getdata() receives an empty string caused by the user inputing the end of string character, in this case '#', it should break from the prompt loop and return to app_read, but instead it cycles through all the prompts. I've added a return value for this special case in ast_readstring().
>
>
> This addresses bug 0014279.
> http://bugs.digium.com/view.php?id=0014279
>
>
> Diffs
> -----
>
> /trunk/apps/app_read.c 179737
> /trunk/include/asterisk/channel.h 179737
> /trunk/main/app.c 179737
> /trunk/main/channel.c 179737
>
> Diff: http://reviewboard.digium.com/r/177/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> David
>
>
More information about the asterisk-dev
mailing list