Bug 614526 - fixing AI_CANONNAME condition bustage, r=wtc, a=bz
authorHonza Bambas <honzab.moz@firemni.cz>
Fri, 28 Jan 2011 18:24:41 +0100
changeset 61552 3bba6b2caabd6be9b8b4a40c63d6592669230074
parent 61551 846f2ea91e63392221ea1944ae8c1156e1f06139
child 61553 1fb93d40acc9e4bf4d207d02d9dc6a822fb8f7c5
push idunknown
push userunknown
push dateunknown
reviewerswtc, bz
bugs614526
milestone2.0b11pre
Bug 614526 - fixing AI_CANONNAME condition bustage, r=wtc, a=bz
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