[asterisk-dev] [Code Review] app_read does not break from prompt loop with empty string

David Vossel dvossel at digium.com
Tue Mar 3 11:20:52 CST 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/177/
-----------------------------------------------------------

(Updated 2009-03-03 11:20:52.646767)


Review request for Asterisk Developers and Russell Bryant.


Changes
-------

Added enum to clarify return values. 


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 (updated)
-----

  /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