[asterisk-dev] [Code Review] app_read does not break from prompt loop with empty string
David Vossel
dvossel at digium.com
Fri Feb 27 10:49:49 CST 2009
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/177/
-----------------------------------------------------------
(Updated 2009-02-27 10:49:49.706881)
Review request for Asterisk Developers and Russell Bryant.
Changes
-------
revised description. previous one was incorrect.
Summary (updated)
-------
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/main/app.c 178900
/trunk/apps/app_read.c 178900
/trunk/main/channel.c 178900
Diff: http://reviewboard.digium.com/r/177/diff
Testing
-------
Thanks,
David
More information about the asterisk-dev
mailing list