Don't be confusing in linux, even if we're less informative.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4133 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
ec536b4908
commit
beedecc3e9
1 changed files with 17 additions and 1 deletions
|
@ -23,7 +23,9 @@ struct sockaddr;
|
|||
#include "quakedef.h"
|
||||
#include "netinc.h"
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#define USE_GETHOSTNAME_LOCALLISTING
|
||||
#endif
|
||||
|
||||
netadr_t net_local_cl_ipadr; //still used to match local ui requests (quake/gamespy), and to generate ip reports for q3 servers (which is probably pointless).
|
||||
|
||||
|
@ -1618,6 +1620,7 @@ int FTENET_Generic_GetLocalAddress(ftenet_generic_connection_t *con, netadr_t *o
|
|||
memset(&adr, 0, sizeof(adr));
|
||||
SockadrToNetadr(&from, &adr);
|
||||
|
||||
#ifdef USE_GETHOSTNAME_LOCALLISTING
|
||||
if (adr.type == NA_IPV6 &&
|
||||
!*(int*)&adr.address.ip6[0] &&
|
||||
!*(int*)&adr.address.ip6[4] &&
|
||||
|
@ -1734,7 +1737,20 @@ int FTENET_Generic_GetLocalAddress(ftenet_generic_connection_t *con, netadr_t *o
|
|||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (adr.type == NA_IPV6 &&
|
||||
!*(int*)&adr.address.ip6[0] &&
|
||||
!*(int*)&adr.address.ip6[4] &&
|
||||
!*(int*)&adr.address.ip6[8] &&
|
||||
!*(int*)&adr.address.ip6[12])
|
||||
{
|
||||
if (idx++ == count)
|
||||
{
|
||||
*out = adr;
|
||||
out->type = NA_IP;
|
||||
}
|
||||
}
|
||||
if (idx++ == count)
|
||||
*out = adr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue