From: divverent Date: Sun, 1 Apr 2012 09:36:28 +0000 (+0000) Subject: Turn off RFC 1149 on systems that have it enabled. X-Git-Tag: xonotic-v0.7.0~181 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8552d9fd16953726bd29e1e5b24c16e159577044;p=xonotic%2Fdarkplaces.git Turn off RFC 1149 on systems that have it enabled. We got massive reports of lags on systems supporting this protocol. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11775 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=fa561c1a0e1f754cab309168853a0e3b253081c8 --- diff --git a/lhnet.c b/lhnet.c index c07866ad..fc1acf2b 100644 --- a/lhnet.c +++ b/lhnet.c @@ -945,6 +945,20 @@ lhnetsocket_t *LHNET_OpenSocket_Connectionless(lhnetaddress_t *address) lhnetaddressnative_t *localaddress = (lhnetaddressnative_t *)&lhnetsocket->address; SOCKLEN_T namelen; int bindresult; + +#if defined(SOL_RFC1149) && defined(RFC1149_1149ONLY) + // we got reports of massive lags when this protocol was chosen as transport + // so better turn it off + { + int rfc1149only = 0; + int rfc1149enabled = 0; + if(setsockopt(lhnetsocket->inetsocket, SOL_RFC1149, RFC1149_1149ONLY, &rfc1149only)) + Con_Printf("LHNET_OpenSocket_Connectionless: warning: setsockopt(RFC1149_1149ONLY) returned error: %s\n", LHNETPRIVATE_StrError()); + if(setsockopt(lhnetsocket->inetsocket, SOL_RFC1149, RFC1149_ENABLED, &rfc1149enabled)) + Con_Printf("LHNET_OpenSocket_Connectionless: warning: setsockopt(RFC1149_ENABLED) returned error: %s\n", LHNETPRIVATE_StrError()); + } +#endif + #ifdef SUPPORTIPV6 if (address->addresstype == LHNETADDRESSTYPE_INET6) {