[quake3-commits] r1576 - trunk/code/qcommon
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Jun 22 20:19:08 EDT 2009
Author: thilo
Date: 2009-06-22 20:19:08 -0400 (Mon, 22 Jun 2009)
New Revision: 1576
Modified:
trunk/code/qcommon/net_ip.c
Log:
minor cleanup
Modified: trunk/code/qcommon/net_ip.c
===================================================================
--- trunk/code/qcommon/net_ip.c 2009-06-22 23:32:11 UTC (rev 1575)
+++ trunk/code/qcommon/net_ip.c 2009-06-23 00:19:08 UTC (rev 1576)
@@ -284,8 +284,6 @@
hintsp = &hints;
hintsp->ai_family = family;
hintsp->ai_socktype = SOCK_DGRAM;
- // FIXME: we should set "->ai_flags" to AI_PASSIVE if we intend
- // to use this structure for a bind() - instead of a sendto()
retval = getaddrinfo(s, NULL, hintsp, &res);
@@ -294,18 +292,20 @@
if(family == AF_UNSPEC)
{
// Decide here and now which protocol family to use
- if((net_enabled->integer & NET_ENABLEV6) && (net_enabled->integer & NET_PRIOV6))
- search = SearchAddrInfo(res, AF_INET6);
+ if((net_enabled->integer & NET_PRIOV6)
+ {
+ if(net_enabled->integer & NET_ENABLEV6)
+ search = SearchAddrInfo(res, AF_INET6);
+
+ if(!search && (net_enabled->integer & NET_ENABLEV4))
+ search = SearchAddrInfo(res, AF_INET);
+ }
else
- search = SearchAddrInfo(res, AF_INET);
-
- if(!search)
{
- if((net_enabled->integer & NET_ENABLEV6) &&
- (net_enabled->integer & NET_PRIOV6) &&
- (net_enabled->integer & NET_ENABLEV4))
+ if(net_enabled->integer & NET_ENABLEV4)
search = SearchAddrInfo(res, AF_INET);
- else if(net_enabled->integer & NET_ENABLEV6)
+
+ if(!search && (net_enabled->integer & NET_ENABLEV6))
search = SearchAddrInfo(res, AF_INET6);
}
}
More information about the quake3-commits
mailing list