Commit graph

56 commits

Author SHA1 Message Date
Zack Middleton
3b09685b42 - Have NET_Sleep work with Windows' INVALID_SOCKET again...
- Use SOCKET_ERROR in NET_Sleep.
2012-06-19 22:36:54 +00:00
Zack Middleton
725c9df608 #5672 - Fixed incorrect type usage in NET_Sleep(), patch from Özkan Sezer. 2012-06-19 16:12:16 +00:00
Zack Middleton
6ff3b03376 fix IPv6-only operation of Windows binaries
the SOCKET type is unsigned on Windows, and should be casted to an int before comparing with the highestfd variable (note: ``int highestfd = -1;'')

From /dev/humancontroller.
2012-06-18 16:05:47 +00:00
Zack Middleton
c16338cfa9 fix wrong socket ID comparison, from /dev/humancontroller 2012-06-18 16:03:06 +00:00
Zack Middleton
395225cb7e #5439 - Potential memory leak in host name resolution. (Eugene C.) 2012-04-05 21:29:51 +00:00
Zack Middleton
a5c88d0e0d Removed an unused variable (which wasn't compiled in as _DEBUG isn't defined using make). 2011-12-08 22:53:58 +00:00
Thilo Schulz
66820c79f4 Fix net_restart when networking was temporarily disabled 2011-12-03 02:23:38 +00:00
Thilo Schulz
23f6fd1633 Bug 5094 - Code cleanup, patch by Zack Middleton and DevHC. Fixes unused-but-set gcc warnings 2011-07-29 12:27:00 +00:00
Thilo Schulz
e6ba500164 Move rate limiting / queued packet sending logic from Com_Frame() to sv_main.c 2011-07-15 16:51:54 +00:00
Thilo Schulz
2d1187b287 - Clear ip address listings after a NET_Restart
- check for oldGameSet instead of the gamename string
2011-06-21 13:31:19 +00:00
Thilo Schulz
bd2b704c91 OpenBSD compile fixes, patch provided by Jonathan Gray (#4994) 2011-06-06 14:59:54 +00:00
Thilo Schulz
a0582fb21a Fix a little quirk still 2011-04-26 02:32:05 +00:00
Thilo Schulz
797d127dfc Use memcmp instead of self-built while loop 2011-04-26 02:30:12 +00:00
Thilo Schulz
34e0a6c6f6 Make NET_Sleep wait 1ms less than requested, then busy-wait the last ms for better timeout precision. 2011-02-23 18:09:17 +00:00
Thilo Schulz
0e6427f3ff - Hopefully fix (#3984) compiler errors on Solaris while not introducing too many new ones on the other platforms
- With _BSD_SOURCE now explicitly defined bring back strdup to vm_x86_64_assembler.c
2011-02-06 20:26:18 +00:00
Thilo Schulz
e5dbce839a - Use select() to sleep when idle as opposed to busy waiting.
- Introduce com_busyWait cvar to go back to old behaviour
2011-02-02 16:46:23 +00:00
Thilo Schulz
6179036ac9 Fix name resolution for domains with A and AAAA record 2011-01-24 01:55:12 +00:00
Tim Angus
9018fedd16 * Clean-up whitespace in net_ip.c 2010-01-10 18:28:32 +00:00
Thilo Schulz
621f91783c Different default values for multicast-scope on Windows and non-Windows OS 2009-11-04 00:42:22 +00:00
Ryan C. Gordon
82d437ee4f Fixed uninitialized variable. 2009-09-14 19:31:42 +00:00
Thilo Schulz
9b2b9abd25 - Add error handling for Opensolaris f***ing up a numeric getnameinfo() call.
- Fix memory leak in getaddrinfo() call
Many thanks to Ben Millwood for reporting this.
2009-06-26 18:11:45 +00:00
Thilo Schulz
948f7a6015 - fix typo in previous commit to net_ip.c
- Make servers send heartbeats to master servers in ipv4 as well as ipv6 if master server has both protocols
2009-06-23 00:59:47 +00:00
Thilo Schulz
78254a626f Move these definitions over for other files to use in preparation of the next commit 2009-06-23 00:45:07 +00:00
Thilo Schulz
fb5f2a40ad minor cleanup 2009-06-23 00:19:08 +00:00
Thilo Schulz
0d6741fb23 Fix setsockopt so that setting the IPV6ONLY flag really works. 2009-06-22 23:32:11 +00:00
Thilo Schulz
3dddabcc52 Fix highest file descriptor for select(), thanks to Ben Millwood for reporting 2009-06-05 18:54:47 +00:00
Thilo Schulz
7aed7e8861 Make command net_restart work so that port/ip settings can be changed without server restart 2009-05-29 03:14:49 +00:00
Thilo Schulz
50ca55702f - Introduce new NET_CompareBaseAdrMask for easy comparison of ip address ranges
- Overhaul of the new banning functions:
  * basic check for redundant bans/exceptions
  * introduction of sv_banFile to make it possible to configure the file where to read bans and exceptions from
  * bans can now be deleted by giving address ranges, too.
2009-05-24 16:58:08 +00:00
Thilo Schulz
09d9e5e19b Minor code cleanups 2009-05-21 21:10:25 +00:00
Tim Angus
72dea0a184 * Fix some new GCC 4.3 warnings
* Fix many many strict aliasing warnings, now that it's re-enabled
2008-11-10 23:55:22 +00:00
Thilo Schulz
83540695b3 Patch to make getnameinfo() call work on OpenBSD systems. Created by agent59692154@spamcorptastic.com 2008-10-29 15:53:46 +00:00
Thilo Schulz
9dd887b2ea - Add scope id to ipv6 addresses.
- Clean up a few other ipv6 issues like removing the seemingly unnecessary MacOSX workaround.
- Bring ipv6 master server up to speed for dpmaster

Thanks go out to Mathieu Olivier for this work.
2008-08-31 19:54:29 +00:00
Tim Angus
7edcc7d16a * Use IPv6 header qcommon/wspiapi.h if it has been added by the end user
* Update README to explain the Windows XP requirement
2008-08-09 19:12:30 +00:00
Ludwig Nussel
a98fed9ee2 bind ipv6 sockets first
by binding the ipv6 sockets first it's possible to bind 0.0.0.0 and
:: to the same port.
2008-06-12 18:32:33 +00:00
Ludwig Nussel
b060eae562 show numeric address the server binds to 2008-06-12 18:32:29 +00:00
Ludwig Nussel
a15002ad0d reorder includes to fix build on OpenBSD (#3663, patch by Jonathan Gray) 2008-05-25 10:00:15 +00:00
Thilo Schulz
843994c074 whoops. 2008-05-17 10:50:08 +00:00
Thilo Schulz
81f9b20bfb - Workaround for buggy MacOSX getaddrinfo() implementation that doesn't accept AF_UNSPEC parameter in hints structure. Thanks icculus for reporting.
- Add -faltivec flag for debug builds.
2008-05-17 10:46:41 +00:00
Tim Angus
a857487f9b * Fix a bunch of compile warnings
* Only call pkg-config if it exists
* Remove cl_consoleHistory from README
2008-05-10 18:51:02 +00:00
Thilo Schulz
1306d9760d Fix crash bug for interfaces without assigned address, thanks to PhoinixGR for reporting. 2008-04-21 13:34:44 +00:00
Thilo Schulz
d77d3e0658 fix obvious bug, thanks mattn2 2008-04-16 20:57:08 +00:00
Ludwig Nussel
7a8c1ddaa6 Fix build on IRIX (Patrick Baggett) 2008-04-16 06:42:29 +00:00
Thilo Schulz
eb74549dde Only don't send packet on disabled multicast if it actually is a multicast packet 2008-04-12 17:03:18 +00:00
Thilo Schulz
78a82bcba2 Add com_standalone cvar for at-runtime handling of mods that do not require the original quake3 game data. 2008-04-10 15:37:25 +00:00
Thilo Schulz
ca5fabe8c6 Fix uninitialized usage warnings on MacOSX. 2008-04-09 22:20:04 +00:00
Thilo Schulz
eb3b59308b Add Multicast capabilities for LAN server scanning. 2008-04-09 14:37:42 +00:00
Tim Angus
85bee47f52 * Fix to MinGW build following IPv6 changes 2008-04-05 16:01:58 +00:00
Thilo Schulz
fcbf0bdd84 I hope this makes the code work on solaris, too and fix the EINVAL on sendto() 2008-04-05 15:10:50 +00:00
Thilo Schulz
70cd2ccfab - include Winsock2.h for windows
- add a __BSD__ define for all bsd platforms if it doesn't exist.
2008-04-05 14:28:57 +00:00
Thilo Schulz
7b80773212 Fix compilation on Solaris and possibly other platforms that have no getifaddrs() 2008-04-05 13:18:09 +00:00