aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-06-23 00:19:08 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-06-23 00:19:08 +0000
commitd12dcd1d6dfbcc57926f5caae0a88cc5cc2be330 (patch)
tree21ba4d893b420a90e30457b2519cb05fa480e16f
parent6c1d89f1fb44b824439f9fa86ab9f736d260a984 (diff)
downloadioquake3-aero-d12dcd1d6dfbcc57926f5caae0a88cc5cc2be330.tar.gz
ioquake3-aero-d12dcd1d6dfbcc57926f5caae0a88cc5cc2be330.zip
minor cleanup
git-svn-id: svn://svn.icculus.org/quake3/trunk@1576 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r--code/qcommon/net_ip.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/code/qcommon/net_ip.c b/code/qcommon/net_ip.c
index 06bed4b..725ca35 100644
--- a/code/qcommon/net_ip.c
+++ b/code/qcommon/net_ip.c
@@ -284,8 +284,6 @@ static qboolean Sys_StringToSockaddr(const char *s, struct sockaddr *sadr, int s
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 @@ static qboolean Sys_StringToSockaddr(const char *s, struct sockaddr *sadr, int s
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);
}
}