[OpenAFS-devel] [patch] darwin libresolv needs res_init() to adapt to network changes

Derrick J Brashear shadow@dementia.org
Tue, 26 Dec 2006 16:05:53 -0500 (EST)


On Tue, 26 Dec 2006, Adam Megacz wrote:

> cvs diff: Diffing src/afsd
> Index: src/afsd/afsd.c
> ===================================================================
> RCS file: /cvs/openafs/src/afsd/afsd.c,v
> retrieving revision 1.43.2.18
> diff -B -u -b -r1.43.2.18 afsd.c
> --- src/afsd/afsd.c     21 Aug 2006 20:39:40 -0000      1.43.2.18
> +++ src/afsd/afsd.c     26 Dec 2006 09:10:03 -0000
> @@ -1248,6 +1248,11 @@
>     acellName[0] = '\0';
>
>     while (1) {
> +#ifdef AFS_DARWIN_ENV
> +      /* libresolv only reads /etc/resolv.conf when this is invoked */
> +      res_init();
> +#endif
> +

Is there any resource which is leaked by calling res_init() repeatedly?