3 Feb 2009 18:45
Re: IPv6 servers redux
Hi, I've found some time to look at the IPv6 servers patch. On Wed, Jan 14, 2009 at 02:23:01PM +0100, Daniel Stenberg wrote: > On Thu, 18 Dec 2008, Gregor Jasny wrote: > It struck me that the API for ares_get_servers() is not really solid. How > would a user free the list of servers again? We can't assume that free() is > fine on memory returned from c-ares. > > Would it perhaps make sense to fill in a given buffer instead of doing a > malloc, and then do a 'too small buffer' return code if the buffer isn't > large > enough to hold the full list? The other solution is of course to make a more > generic ares_free() function that would free the given resource. It could > then > be made somewhat genericly so that it can be used for future returned data > as well... I've created ares_free(), a simple wrapper around free(). I think that will do it for now. I've tested DNS lookup as usual via adig with IPv4 and IPv6. Thanks, Gregor
RSS Feed