[asterisk-dev] [Code Review]: Add IPv6 Support To Manager
Kevin Fleming
reviewboard at asterisk.org
Thu Jun 7 10:43:08 CDT 2012
> On June 6, 2012, 7:54 a.m., Simon Perreault wrote:
> > /trunk/main/manager.c, line 6997
> > <https://reviewboard.asterisk.org/r/1968/diff/1/?file=28535#file28535line6997>
> >
> > What's wrong with atoi()? Why not keep using it?
>
> Kevin Fleming wrote:
> atoi() does not have the ability to report errors (strings it cannot parse result in '0' results). It will accept '35foobar' and return 35, at least on some platforms. sscanf() has none of these problems, so we prefer it for configuration parsing so that we can tell the user if they've likely done something wrong.
>
> Simon Perreault wrote:
> This is becoming off-topic, but have you thought about importing strtonum() from OpenBSD?
>
> http://www.openbsd.org/cgi-bin/man.cgi?query=strtonum
> http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdlib/strtonum.c?rev=1.6
I'm not aware of any discussions along those lines, no. We've been satisfied with using sscanf().
- Kevin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1968/#review6385
-----------------------------------------------------------
On June 5, 2012, 10 p.m., elguero wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1968/
> -----------------------------------------------------------
>
> (Updated June 5, 2012, 10 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> Adding support for IPv6 communication to the manager.
>
>
> This addresses bug ASTERISK-19965.
> https://issues.asterisk.org/jira/browse/ASTERISK-19965
>
>
> Diffs
> -----
>
> /trunk/main/manager.c 368584
> /trunk/CHANGES 368584
>
> Diff: https://reviewboard.asterisk.org/r/1968/diff
>
>
> Testing
> -------
>
> Fedora 16 dev box
> Centos 5.8 test box
>
> Tested only AMI and HTTP...
>
>
> Thanks,
>
> elguero
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120607/4d3748c0/attachment.htm>
More information about the asterisk-dev
mailing list