From 9967400079c0cc81accce33c90349be10dee0535 Mon Sep 17 00:00:00 2001 From: divverent Date: Tue, 22 May 2007 08:07:34 +0000 Subject: [PATCH] Win32: ioctl SIO_UDP_CONNRESET <- FALSE git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7336 d7cf8633-e32d-0410-b094-e92efae38249 --- lhnet.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lhnet.c b/lhnet.c index 65b9f827..bc6f53c5 100644 --- a/lhnet.c +++ b/lhnet.c @@ -42,6 +42,10 @@ #define SOCKETERRNO WSAGetLastError() +#define IOC_VENDOR 0x18000000 +#define _WSAIOW(x,y) (IOC_IN|(x)|(y)) +#define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12) + #define SOCKLEN_T int #elif defined(__MORPHOS__) #define ioctlsocket IoctlSocket @@ -571,6 +575,7 @@ lhnetsocket_t *LHNET_OpenSocket_Connectionless(lhnetaddress_t *address) { #ifdef WIN32 u_long _true = 1; + u_long _false = 0; #else char _true = 1; #endif @@ -588,6 +593,10 @@ lhnetsocket_t *LHNET_OpenSocket_Connectionless(lhnetaddress_t *address) lhnetsocket->prev = lhnetsocket->next->prev; lhnetsocket->next->prev = lhnetsocket; lhnetsocket->prev->next = lhnetsocket; +#ifdef WIN32 + if (ioctlsocket(lhnetsocket->inetsocket, SIO_UDP_CONNRESET, &_false) == -1) + Con_DPrintf("LHNET_OpenSocket_Connectionless: ioctlsocket SIO_UDP_CONNRESET returned error: %s\n", LHNETPRIVATE_StrError()); +#endif return lhnetsocket; } else -- 2.39.2