Date: Wed, 1 Aug 2007 06:10:07 GMT From: Mark Andrews <Mark_Andrews@isc.org> To: freebsd-standards@FreeBSD.org Subject: Re: standards/114910: getaddrinfo() fails to set ai_canonname Message-ID: <200708010610.l716A7k2008909@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR standards/114910; it has been noted by GNATS.
From: Mark Andrews <Mark_Andrews@isc.org>
To: bug-followup@FreeBSD.org, marka@isc.org
Cc:
Subject: Re: standards/114910: getaddrinfo() fails to set ai_canonname
Date: Wed, 01 Aug 2007 16:09:09 +1000
This is a multi-part message in MIME format.
--------------030507020508000005080008
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
--------------030507020508000005080008
Content-Type: text/plain;
name="diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="diff"
Index: lib/libc/net/getaddrinfo.c
===================================================================
RCS file: /home/ncvs/src/lib/libc/net/getaddrinfo.c,v
retrieving revision 1.69.2.9
diff -u -r1.69.2.9 getaddrinfo.c
--- lib/libc/net/getaddrinfo.c 30 Jul 2006 06:11:43 -0000 1.69.2.9
+++ lib/libc/net/getaddrinfo.c 1 Aug 2007 06:06:46 -0000
@@ -1727,8 +1727,11 @@
cur->ai_next = get_ai(&ai, afd, (const char *)cp);
if (cur->ai_next == NULL)
had_error++;
- while (cur && cur->ai_next)
+ while (cur && cur->ai_next) {
+ (void)get_canonname(pai, cur->ai_next,
+ canonname ? canonname : qname);
cur = cur->ai_next;
+ }
cp += n;
break;
default:
@@ -1751,10 +1754,6 @@
}
}
#endif /*RESOLVSORT*/
- if (!canonname)
- (void)get_canonname(pai, sentinel.ai_next, qname);
- else
- (void)get_canonname(pai, sentinel.ai_next, canonname);
RES_SET_H_ERRNO(res, NETDB_SUCCESS);
return sentinel.ai_next;
}
--------------030507020508000005080008--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708010610.l716A7k2008909>
