[asterisk-dev] AST_DATA_IPADDR is broken

Eliel Sardañons eliels at gmail.com
Thu Nov 25 09:04:25 CST 2010


Not sure, if you look at the API, the idea is to specify the kind of 
data being stored,
to make simple enough the information parsing.

But, I also agree with your idea about calling it AST_DATA_SOCKADDR.



On 11/25/2010 12:00 PM, Simon Perreault wrote:
> On 2010-11-25 09:57, Eliel Sardañons wrote:
>    
>> What about having one for each kind of ip address?
>>
>> AST_DATA_IPADDR
>> AST_DATA_IPADDR6
>>      
> What about other kinds of addresses? An ast_sockaddr should be able to
> accomodate any kind of sockaddr.
>
>  From an API point of view, the user shouldn't have to care/know what
> kind of address is contained. An address is an address. Having different
> types creates the opportunity for bugs when you get the type wrong.
> Also, it introduced different code paths that would be very similar.
>
> Simon
>    




More information about the asterisk-dev mailing list