diff options
author | Simon Howard | 2012-10-28 10:41:45 +0000 |
---|---|---|
committer | Simon Howard | 2012-10-28 10:41:45 +0000 |
commit | 501b13786b024388b3cd7a21c8be8501dbfffb02 (patch) | |
tree | b4b213c71284b7eaadb576ee7bdbf4a4f780fbb5 /src/net_sdl.c | |
parent | f7ecbd1449871a448daa7b96ce121f3fe9d19aed (diff) | |
download | chocolate-doom-501b13786b024388b3cd7a21c8be8501dbfffb02.tar.gz chocolate-doom-501b13786b024388b3cd7a21c8be8501dbfffb02.tar.bz2 chocolate-doom-501b13786b024388b3cd7a21c8be8501dbfffb02.zip |
Add functions for network signature requests. These request the signed
messages from the master server, to be used at the start and end of
recording a secure demo.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2535
Diffstat (limited to 'src/net_sdl.c')
-rw-r--r-- | src/net_sdl.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/net_sdl.c b/src/net_sdl.c index 2589540d..2f7eaa6f 100644 --- a/src/net_sdl.c +++ b/src/net_sdl.c @@ -44,6 +44,7 @@ #define DEFAULT_PORT 2342 +static boolean initted = false; static int port = DEFAULT_PORT; static UDPsocket udpsocket; static UDPpacket *recvpacket; @@ -162,6 +163,9 @@ static boolean NET_SDL_InitClient(void) { int p; + if (initted) + return true; + //! // @category net // @arg <n> @@ -189,13 +193,18 @@ static boolean NET_SDL_InitClient(void) srand(time(NULL)); #endif + initted = true; + return true; } static boolean NET_SDL_InitServer(void) { int p; - + + if (initted) + return true; + p = M_CheckParmWithArgs("-port", 1); if (p > 0) port = atoi(myargv[p+1]); @@ -214,6 +223,8 @@ static boolean NET_SDL_InitServer(void) srand(time(NULL)); #endif + initted = true; + return true; } |