summaryrefslogtreecommitdiff
path: root/src/net_server.c
AgeCommit message (Collapse)Author
2015-02-22Fix mistaken uses of memcpy() on overlapping memory.Simon Howard
The source and destination arguments to memcpy() cannot be overlapping as this is undefined behavior. In these situations memmove() must be used instead, and OpenBSD actually throws an error if this is done. Thanks to ryan-sg for reporting this. This fixes #510.
2014-10-24Replace strdup() with M_StringDuplicate().Simon Howard
strdup() can theoretically fail and return NULL. This could lead to a crash or undesirable behavior. Add M_StringDuplicate() which does the same thing but exits with an error if a string cannot be allocated. This fixes #456. Thanks to Quasar for the suggestion.
2014-05-05Clean up file headers.Simon Howard
This change rewrites and simplifies the copyright headers at the top of all source files: * Remove "Emacs style mode select" line; this line was included in the headers for the originally released source files and appears to be to set the file type for old versions of Emacs. I'm not sure entirely why it was required but I don't think it is any more. * Remove "You should have received a copy of..." text from copyright header. This refers to the old 59 Temple Place address where the FSF headquarters used to be located and is no longer correct. Rather than change to the new address, just remove the paragraph as it is superfluous anyway. This fixes #311. * Remove ---- separator lines so that the file headers are barer and more simplified.
2014-04-19server: Fix sending of WAD/DEH checksums to clients.Simon Howard
Clients receive the WAD and dehacked checksums of the controlling player and are supposed to display a warning at the startup screen if they do not match. However, reversed logic in the code that sends the waiting data to clients meant that they were always sent their own checksums, so the error message was never displayed. This fixes #384.
2014-04-01Replace all snprintf() calls with M_snprintf().Simon Howard
The Windows API has an _snprintf function that is not the same as Unix's snprintf(): if the string is truncated then no trailing NUL character is appended. This makes the function unsafe. Define a replacement/wrapper called M_snprintf that works the same but always appends a trailing NUL, for safety on Windows and other OSes that behave like this. Do the same thing for vsnprintf(), and update HACKING to list snprintf/vsnprintf as forbidden functions. This fixes #375; thanks to Quasar for pointing out the different behavior of these functions.
2014-03-29common: Eliminate use of unsafe string functions.Simon Howard
Remove some remaining uses of strncpy() and use M_StringCopy() instead.
2013-10-06Change netgame version mismatch message to be reminiscent of the VanillaSimon Howard
message (thanks Alexandre Xavier). Subversion-branch: /branches/v2-branch Subversion-revision: 2693
2013-04-06Handle client disconnects when waiting for the game to start. Abort gameSimon Howard
startup if a player disconnects, or continue gracefully if a drone disconnects. Subversion-branch: /branches/v2-branch Subversion-revision: 2588
2013-04-03Don't start the game until all players are ready. Send waiting data toSimon Howard
players that are ready for startup progress screens. Subversion-branch: /branches/v2-branch Subversion-revision: 2581
2013-04-02Split game start sequence into two-stage process. This is the firstSimon Howard
stage in refactoring the way that network startup works. Subversion-branch: /branches/v2-branch Subversion-revision: 2580
2012-10-28Merge from trunk.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2537
2012-10-25Switch from MD5 to SHA-1 for network digests.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2530
2012-02-02Re-resolve the address of the master server every eight hours, to adaptSimon Howard
to changes in DNS configuration. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2486
2011-10-19Send MAXPLAYERS value for game on connect to server. Make server adaptSimon Howard
its player limit to match. Update GUI code to adjust waiting screen list size appropriately. Subversion-branch: /branches/v2-branch Subversion-revision: 2442
2011-10-19Change MAXPLAYERS to NET_MAXPLAYERS and add back individual MAXPLAYERSSimon Howard
defines for each game. Refactor "waiting screen" data code. Subversion-branch: /branches/v2-branch Subversion-revision: 2441
2011-10-17Rework net_connect_data_t structure to include WAD and DehackedSimon Howard
checksums, plus the is_freedoom flag. Subversion-branch: /branches/v2-branch Subversion-revision: 2434
2011-10-14Convert Hexen to use common main loop code. Working multiplayer!Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2423
2011-10-13Fix lockup just after startup of single-player multiplayer games. Don'tSimon Howard
allow the server to advance too far ahead of the client. Subversion-branch: /branches/v2-branch Subversion-revision: 2420
2011-06-13Merge from trunk.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 2347
2011-04-24Infer -server when -privateserver is specified (thanks Porsche Monty).Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2330
2011-02-12Merge from trunk.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 2258
2010-12-18Add a M_CheckParmWithArgs function, that behaves like M_CheckParm butSimon Howard
also checks that extra options were provided on the command line (thanks Sander van Dijk). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2223
2010-12-10Merge from trunk.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 2214
2010-12-10Merge from trunk. This is slightly out of date as I did the mergeSimon Howard
several days ago. Subversion-branch: /branches/raven-branch Subversion-revision: 2212
2010-12-07Assign the oldest client to be the controller, not the first found inSimon Howard
the clients[] array. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2201
2010-12-02Add -servername parameter to allow the owner to change the name returnedSimon Howard
in response to queries (thanks AlexMax). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2185
2010-12-02Register servers with Internet master server.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2181
2010-11-20Remove dependency of network code on Doom code.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 2163
2009-11-21Merge from trunk.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 1737
2009-09-30Change British English spellings to American English, for consistency.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1699
2008-09-10Split off game mode/mission/version definitions into common code, alongSimon Howard
with various netgame constants. Subversion-branch: /branches/raven-branch Subversion-revision: 1218
2008-09-06Remove includes of doomdef.h where possible, move generic parts into topSimon Howard
level. Subversion-branch: /branches/raven-branch Subversion-revision: 1204
2008-02-21Shut up compile warning.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1087
2008-02-17Add command line option for server to allow client version checking toSimon Howard
be disabled. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1086
2007-08-09Remove debugging message.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 956
2007-08-09Disconnect any remaining drones when the last real player quits.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 954
2007-04-16Fix crash: don't check for client resends after they have disconnected.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 870
2006-11-16Display lowres turning warning message client-side, not throughSimon Howard
server-side broadcast messages. This avoids the possibility of malicious servers that might not send the message. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 755
2006-10-18Strip out CVS logs, RCS Id tags.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 704
2006-10-14Display drone indicator on the netgame waiting screen if drones are connected.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 699
2006-10-14Display a different message from the normal WAD directory warning ifSimon Howard
players are mixing Freedoom/Original IWADs. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 698
2006-10-11Shut up compiler warnings.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 694
2006-10-06Send deh/wad md5sums to players at the waiting screen. Display a warningSimon Howard
on the waiting screen if the checksums differ from the other players. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 689
2006-10-06Send deh/wad checksums to the server when connecting.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 688
2006-10-05Prevent against deadlock where client and server are both stuck waitingSimon Howard
for each other to send data. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 685
2006-09-30Make the server stop sending if one of the clients stops acknowledging.Simon Howard
Fix check on number of players on connect. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 682
2006-09-29Working drone clients!Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 680
2006-09-21Fix a lot of warnings (for fussy compilers) and one always-true checkRussell Rice
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 641
2006-09-17Split off query data into a net_querydata_t structure in net_structrw.cSimon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 612
2006-04-06Add the ability to query the current state of servers, and '-query'Simon Howard
command line option to do so. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 464