[asterisk-dev] [Code Review] Modify standard argument parser not to consume characters in certain situations

Mark Michelson mmichelson at digium.com
Fri Jul 24 10:10:11 CDT 2009


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

Ship it!


Looks good by me!


/trunk/include/asterisk/app.h
<https://reviewboard.asterisk.org/r/316/#comment2365>

    Why is this macro needed? Couldn't you just keep the old four-argument ast_app_separate_args function around instead?


- Mark


On 2009-07-23 17:13:56, Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/316/
> -----------------------------------------------------------
> 
> (Updated 2009-07-23 17:13:56)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> The current standard argument parser consumes quotes and backslashes.  Usually, this should only occur once per argument line, which is problematic if the line contains multiple sets of data, which need to be parsed separately.  This patch changes the standard argument parser to permit recognizing special delimiters while not consuming them.
> 
> 
> This addresses bug 15557.
>     https://issues.asterisk.org/view.php?id=15557
> 
> 
> Diffs
> -----
> 
>   /trunk/apps/app_stack.c 208150 
>   /trunk/include/asterisk/app.h 208150 
>   /trunk/main/app.c 208150 
> 
> Diff: https://reviewboard.asterisk.org/r/316/diff
> 
> 
> Testing
> -------
> 
> An example of parsing is given in issue 15557 , and this change has been tested to verify that Macro argument passing and Gosub argument passing now work in a similar fashion.
> 
> 
> Thanks,
> 
> Tilghman
> 
>




More information about the asterisk-dev mailing list