Subject: Re: Update ares_init.c for IOS device

Re: Update ares_init.c for IOS device

From: Gregor Jasny <gjasny_at_googlemail.com>
Date: Thu, 20 Aug 2015 16:49:49 +0200

Hello,

On 05/12/14 14:19, David Drysdale wrote:
> Well, an OSX build still seems to work with that patch, but I can't
> comment about the iOS build. Anyone else able to look that over?
>
> (Small nit btw -- there's trailing whitespace in the patch)

The patch works as expected on regular iOS. There are some open issues:

1) Does one have to zero out __res_state prior to res_ninit?
2) Catch res_ninit error
3) In the loop one could handle AF_INET and AF_INET6 in the same code
branch by using NI_MAXHOST for maximum string size and just pass family
as first parameter to inet_ntop
4) failures from inet_ntop should be catched
5) What happens if family is neither AF_INET nor AF_INET6? Status needs
to be explicitly set for every iteration.

Thanks,
Gregor
Received on 2015-08-20