From a7acf10566af549eb71e7a421397c8073d55e0f6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 16 Aug 1998 03:04:06 +0000 Subject: server.c: fixed a bug in close_file() with the new files.c handling code bitmap.c: added bitmap hanlding code in preparation for increasing the default max open files to several thousand (This used to be commit f573a65b67e7a57586fec57845598e49b157ee0a) --- source3/smbd/server.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 8b656ab264..e9aa2d0278 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -1308,7 +1308,7 @@ static void close_filestruct(files_struct *fsp) { connection_struct *conn = fsp->conn; - file_free(fsp); + fsp->reserved = False; fsp->open = False; fsp->is_directory = False; @@ -1388,22 +1388,21 @@ void close_file(files_struct *fsp, BOOL normal_close) void close_directory(files_struct *fsp) { + /* TODO - walk the list of pending + change notify requests and free + any pertaining to this fsp. */ - /* TODO - walk the list of pending - change notify requests and free - any pertaining to this fsp. */ + remove_pending_change_notify_requests_by_fid(fsp); - remove_pending_change_notify_requests_by_fid(fsp); - - /* - * Do the code common to files and directories. - */ - close_filestruct(fsp); - - if (fsp->fsp_name) - string_free(&fsp->fsp_name); - - file_free(fsp); + /* + * Do the code common to files and directories. + */ + close_filestruct(fsp); + + if (fsp->fsp_name) + string_free(&fsp->fsp_name); + + file_free(fsp); } /**************************************************************************** -- cgit