diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-10-11 15:05:50 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-10-11 15:05:50 +0000 |
commit | d02633af4e780c4b6f6d938c67d84d2c968adb79 (patch) | |
tree | 3379b9615e285346ad6b1f87639912e01ecd44c7 /source/files.c | |
parent | f8abe42a0d1a42653b39f6cf320d3fbdd1279bb3 (diff) |
Major redesign of GTV protocol: added support for persistent GTV connections,
bidirectional pinging, low traffic (`suspended') modes.
HTTP server is now gone (remote console logging is temporary gone too),
custom binary protocol is used for GTV connections now.
MVD client no longer serves other MVD clients, only regular spectators.
Changed FIFO buffers to be regular circular buffers, not BIP-buffers.
Removed `sv_http_*', `sv_console_auth' variables.
Added `sv_mvd_maxclients' variable, `addgtvhost', `delgtvhost' and
`listgtvhosts' commands.
Renamed `sv_mvd_max*' cvars for consistency.
Reset `sv_ghostime' default value back to 6, but changed semantics:
it now waits for any packet from client, not just `begin' packet.
Added `--disable-mvd-server' and `--disable-mvd-client' options to
configure script.
FS_Restart() no longer chokes on real files opened for reading.
Fixed client chat prompt length.
Stubbed out more debugging stuff from dedicated server builds.
Diffstat (limited to 'source/files.c')
-rw-r--r-- | source/files.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/source/files.c b/source/files.c index c297c9f..6289d52 100644 --- a/source/files.c +++ b/source/files.c @@ -474,15 +474,7 @@ void FS_FCloseFile( fileHandle_t f ) { break; } - // don't clear name and mode, in case - // this handle will be reopened later - file->type = FS_FREE; - file->fp = NULL; -#if USE_ZLIB - file->zfp = NULL; -#endif - file->pak = NULL; - file->unique = qfalse; + memset( file, 0, sizeof( *file ) ); } /* @@ -2516,12 +2508,16 @@ void FS_Restart( void ) { temp = com_logFile; com_logFile = 0; - // make sure no files are opened for reading + // make sure no files from paks are opened for( i = 0, file = fs_files; i < MAX_FILE_HANDLES; i++, file++ ) { - if( file->type == FS_FREE ) { - continue; - } - if( file->mode == FS_MODE_READ ) { + switch( file->type ) { + case FS_FREE: + case FS_REAL: +#if USE_ZLIB + case FS_GZIP: +#endif + break; + default: Com_Error( ERR_FATAL, "%s: closing handle %d", __func__, i + 1 ); } } |