diff options
author | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-04-12 17:00:18 +0000 |
---|---|---|
committer | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-04-12 17:00:18 +0000 |
commit | 2f4b09a3fd677b7fb66723bd64358dd0798a2af5 (patch) | |
tree | dbbaa32ed2043db251064baacb700ffc973b7fa3 /code/qcommon | |
parent | a957b652bae5d1a5320eb01c349437bc7197b91a (diff) | |
download | ioquake3-aero-2f4b09a3fd677b7fb66723bd64358dd0798a2af5.tar.gz ioquake3-aero-2f4b09a3fd677b7fb66723bd64358dd0798a2af5.zip |
- fix a potential file descriptor leak in server side of pak downloading
- add new functions for banning clients from server, in engine part. This will also make it possible to ban ipv6 addresses in old mods.
git-svn-id: svn://svn.icculus.org/quake3/trunk@1312 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon')
-rw-r--r-- | code/qcommon/files.c | 3 | ||||
-rw-r--r-- | code/qcommon/qcommon.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/code/qcommon/files.c b/code/qcommon/files.c index a5efb7e..07ecfac 100644 --- a/code/qcommon/files.c +++ b/code/qcommon/files.c @@ -715,7 +715,8 @@ int FS_SV_FOpenFileRead( const char *filename, fileHandle_t *fp ) { if (f) { return FS_filelength(f); } - return 0; + + return -1; } diff --git a/code/qcommon/qcommon.h b/code/qcommon/qcommon.h index 8746f3b..396042e 100644 --- a/code/qcommon/qcommon.h +++ b/code/qcommon/qcommon.h @@ -583,6 +583,7 @@ int FS_GetFileList( const char *path, const char *extension, char *listbuf, in int FS_GetModList( char *listbuf, int bufsize ); fileHandle_t FS_FOpenFileWrite( const char *qpath ); +fileHandle_t FS_FOpenFileAppend( const char *filename ); // will properly create any needed paths and deal with seperater character issues int FS_filelength( fileHandle_t f ); |