Bug 614526 - fixing AI_CANONNAME condition bustage, r=wtc, a1.9.2.17=dveditz
authorHonza Bambas <honzab.moz@firemni.cz>
Fri, 28 Jan 2011 18:24:41 +0100
changeset 35008 5e68ad3bb01751542d0edfd7337efc31cd61c745
parent 35007 c5d74bcd74210de5d5d2af0b343cff7bbe2e62de
child 35009 b5a151fc017414074db7e433a1a36332d3495957
push id1861
push userdbaron@mozilla.com
push dateSun, 20 Mar 2011 16:15:26 +0000
reviewerswtc
bugs614526
milestone1.9.2.17pre
Bug 614526 - fixing AI_CANONNAME condition bustage, r=wtc, a1.9.2.17=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