mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-27 06:13:01 +00:00
minor cleanup
This commit is contained in:
parent
0d6741fb23
commit
fb5f2a40ad
1 changed files with 12 additions and 12 deletions
|
@ -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);
|
||||
else
|
||||
search = SearchAddrInfo(res, AF_INET);
|
||||
|
||||
if(!search)
|
||||
if((net_enabled->integer & NET_PRIOV6)
|
||||
{
|
||||
if((net_enabled->integer & NET_ENABLEV6) &&
|
||||
(net_enabled->integer & NET_PRIOV6) &&
|
||||
(net_enabled->integer & NET_ENABLEV4))
|
||||
if(net_enabled->integer & NET_ENABLEV6)
|
||||
search = SearchAddrInfo(res, AF_INET6);
|
||||
|
||||
if(!search && (net_enabled->integer & NET_ENABLEV4))
|
||||
search = SearchAddrInfo(res, AF_INET);
|
||||
else if(net_enabled->integer & NET_ENABLEV6)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(net_enabled->integer & NET_ENABLEV4)
|
||||
search = SearchAddrInfo(res, AF_INET);
|
||||
|
||||
if(!search && (net_enabled->integer & NET_ENABLEV6))
|
||||
search = SearchAddrInfo(res, AF_INET6);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue