Bug 614526 - fixing AI_CANONNAME condition bustage, r=wtc, a1.9.1.19=dveditz
authorHonza Bambas <honzab.moz@firemni.cz>
Fri, 28 Jan 2011 18:24:41 +0100
changeset 27370 aeeba2b6d48747da0d99e90fa49771039bc9e14e
parent 27369 7564dd07fd03c7bfe5ab7f4975a9021ca291c29a
child 27373 52e0d3ae78dd15c022b3087faf9ceed936024980
push id2695
push userdbaron@mozilla.com
push dateSun, 20 Mar 2011 16:16:38 +0000
reviewerswtc
bugs614526
milestone1.9.1.19pre
Bug 614526 - fixing AI_CANONNAME condition bustage, r=wtc, a1.9.1.19=dveditz
nsprpub/pr/src/misc/prnetdb.c
--- a/nsprpub/pr/src/misc/prnetdb.c
+++ b/nsprpub/pr/src/misc/prnetdb.c
@@ -2034,17 +2034,17 @@ PR_IMPLEMENT(PRAddrInfo *) PR_GetAddrInf
 
         /*
          * we assume a RFC 2553 compliant getaddrinfo.  this may at some
          * point need to be customized as platforms begin to adopt the
          * RFC 3493.
          */
 
         memset(&hints, 0, sizeof(hints));
-        if (flags & PR_AI_NOCANONNAME)
+        if (!(flags & PR_AI_NOCANONNAME))
             hints.ai_flags |= AI_CANONNAME;
 #ifdef AI_ADDRCONFIG
         /* 
          * Propagate AI_ADDRCONFIG to the GETADDRINFO call if PR_AI_ADDRCONFIG
          * is set.
          * 
          * Need a workaround for loopback host addresses:         
          * The problem is that in glibc and Windows, AI_ADDRCONFIG applies the