mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 01:01:07 +00:00
net_wins.c: disable WSA*BlockingHook() stuff for winsock2 builds
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1454 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
78ebe4ff0a
commit
586447e449
1 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,7 @@ WSADATA winsockdata;
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
|
#if !defined(_USE_WINSOCK2)
|
||||||
static double blocktime;
|
static double blocktime;
|
||||||
|
|
||||||
static INT_PTR PASCAL FAR BlockingHook (void)
|
static INT_PTR PASCAL FAR BlockingHook (void)
|
||||||
|
@ -66,6 +67,7 @@ static INT_PTR PASCAL FAR BlockingHook (void)
|
||||||
/* TRUE if we got a message */
|
/* TRUE if we got a message */
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif /* ! _USE_WINSOCK2 */
|
||||||
|
|
||||||
|
|
||||||
static void WINS_GetLocalAddress (void)
|
static void WINS_GetLocalAddress (void)
|
||||||
|
@ -87,11 +89,15 @@ static void WINS_GetLocalAddress (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
buff[MAXHOSTNAMELEN - 1] = 0;
|
buff[MAXHOSTNAMELEN - 1] = 0;
|
||||||
|
#ifndef _USE_WINSOCK2
|
||||||
blocktime = Sys_DoubleTime();
|
blocktime = Sys_DoubleTime();
|
||||||
WSASetBlockingHook(BlockingHook);
|
WSASetBlockingHook(BlockingHook);
|
||||||
|
#endif
|
||||||
local = gethostbyname(buff);
|
local = gethostbyname(buff);
|
||||||
err = WSAGetLastError();
|
err = WSAGetLastError();
|
||||||
|
#ifndef _USE_WINSOCK2
|
||||||
WSAUnhookBlockingHook();
|
WSAUnhookBlockingHook();
|
||||||
|
#endif
|
||||||
if (local == NULL)
|
if (local == NULL)
|
||||||
{
|
{
|
||||||
Con_SafePrintf("WINS_GetLocalAddress: gethostbyname failed (%s)\n",
|
Con_SafePrintf("WINS_GetLocalAddress: gethostbyname failed (%s)\n",
|
||||||
|
|
Loading…
Reference in a new issue