[asterisk-dev] [Code Review] Allow quoting and escaping within application options with arguments

David Vossel dvossel at digium.com
Wed Apr 14 14:35:38 CDT 2010



> On 2010-04-14 14:12:02, Tilghman Lesher wrote:
> > /trunk/main/app.c, lines 1840-1861
> > <https://reviewboard.asterisk.org/r/604/diff/4/?file=9268#file9268line1840>
> >
> >     Please understand that that is essentially open-coding a common function, which is another no-no in our coding guidelines.  You're suggesting replacing a function call with 8 lines of code that do exactly the same thing.  Code reuse?

Maybe I miscommunicated my first comment.  If the entire propose of this loop is to occasionally escape some characters, then you could just have an input buffer and an output buffer that point to the same string.  If you skip a character just increment the input buffer and don't copy it over to the output buffer.  For an example see main/utils.c ast_uri_decode().  I really don't care about this, I just thought it was worth pointing out.


- David


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


On 2010-04-14 12:46:49, Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/604/
> -----------------------------------------------------------
> 
> (Updated 2010-04-14 12:46:49)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Original description of the issue is:
> 
> f-option of Dial()-application cannot handle '(' or ')' characters in passed CALLERID-parameter
> 
> 
> Diffs
> -----
> 
>   /trunk/include/asterisk/app.h 257187 
>   /trunk/main/app.c 257187 
>   /trunk/tests/test_app.c 257187 
> 
> Diff: https://reviewboard.asterisk.org/r/604/diff
> 
> 
> Testing
> -------
> 
> Test written to verify behavior.
> 
> 
> Thanks,
> 
> Tilghman
> 
>




More information about the asterisk-dev mailing list