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

David Vossel dvossel at digium.com
Wed Apr 14 13:43:14 CDT 2010


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



/trunk/main/app.c
<https://reviewboard.asterisk.org/r/604/#comment3930>

    If the primary point of the ast_copy_string is just to remove the character from the string. Here's another way to do that that we commonly use that only involves copying over the string once.
    
    char *out
    for (out = s; *s; s++) {
       if (don't skip character) {
          *out = *s;
           out++;
       }
    }
    out = '\0';
    
    That would remove the need to do the ast_copy_string, but since performance isn't a big deal here it doesn't matter.



/trunk/main/app.c
<https://reviewboard.asterisk.org/r/604/#comment3934>

    Maybe I'm wrong, but I don't see this logic covered by the unit test.


- David


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