[asterisk-dev] URI parsing
George Joseph
george.joseph at fairview5.com
Tue May 20 15:39:20 CDT 2014
On Tue, May 20, 2014 at 2:33 PM, Kevin Harwell <kharwell at digium.com> wrote:
> Greetings,
>
> For a task I have been working on in Asterisk I have found myself
> needing to parse URIs. Luckily, Asterisk is already using such a
> library [1], albeit limitedly. As the library also may not be installed
> on every system Asterisk uses #ifdef to work around this.
>
> So instead of having a bunch of #ifdefs sprinkled throughout the code I
> was thinking of locating the parsing code in a central place. Perhaps
> http.c? A new file?
>
>
> ...
> If the third party library is installed it will use that to parse and
> place the data in the structure, otherwise it will fall back and use
> some basic parsing code to do it.
>
> Thoughts?
>
> [1] http://uriparser.sourceforge.net/doc/html/index.html
>
>
> Might want to always use the code rather than as a fallback. That way
there's no chance of the behavior changing based on whether the library is
installed or not at compile time. Maybe its own file under main?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140520/7ab3ff7f/attachment.html>
More information about the asterisk-dev
mailing list