Should fix rjlan's Windows Vista IPV6 problems.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2335 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
2fabcc0904
commit
725912224d
1 changed files with 13 additions and 2 deletions
|
@ -1729,6 +1729,7 @@ int maxport = port + 100;
|
|||
#ifdef IPPROTO_IPV6
|
||||
int UDP6_OpenSocket (int port, qboolean bcast)
|
||||
{
|
||||
int err;
|
||||
int newsocket;
|
||||
struct sockaddr_in6 address;
|
||||
unsigned long _true = true;
|
||||
|
@ -1775,10 +1776,20 @@ int maxport = port + 100;
|
|||
if( bind (newsocket, (void *)&address, sizeof(address)) == -1)
|
||||
{
|
||||
if (!port)
|
||||
Sys_Error ("UDP6_OpenSocket: bind: %s", strerror(qerrno));
|
||||
{
|
||||
err = qerrno;
|
||||
Con_Printf ("UDP6_OpenSocket: bind: (%i) %s", err, strerror(err));
|
||||
closesocket(newsocket);
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
port++;
|
||||
if (port > maxport)
|
||||
Sys_Error ("UDP6_OpenSocket: bind: %s", strerror(qerrno));
|
||||
{
|
||||
err = qerrno;
|
||||
Con_Printf ("UDP6_OpenSocket: bind: (%i) %s", err, strerror(err));
|
||||
closesocket(newsocket);
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
}
|
||||
else
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue