From 3dde0cbb769b92d922be13677ad076cae9b6a693 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 8 Jan 2009 12:03:45 +0100 Subject: s3:smbd: move all globals and static variables in globals.[ch] The goal is to move all this variables into a big context structure. metze --- source3/smbd/files.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'source3/smbd/files.c') diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 1a3a997e59..efaadffc06 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -18,33 +18,18 @@ */ #include "includes.h" - -static int real_max_open_files; +#include "smbd/globals.h" #define VALID_FNUM(fnum) (((fnum) >= 0) && ((fnum) < real_max_open_files)) #define FILE_HANDLE_OFFSET 0x1000 -static struct bitmap *file_bmap; - -static files_struct *Files; - -static int files_used; - -/* A singleton cache to speed up searching by dev/inode. */ -static struct fsp_singleton_cache { - files_struct *fsp; - struct file_id id; -} fsp_fi_cache; - /**************************************************************************** Return a unique number identifying this fsp over the life of this pid. ****************************************************************************/ static unsigned long get_gen_count(void) { - static unsigned long file_gen_counter; - if ((++file_gen_counter) == 0) return ++file_gen_counter; return file_gen_counter; @@ -58,7 +43,6 @@ NTSTATUS file_new(struct smb_request *req, connection_struct *conn, files_struct **result) { int i; - static int first_file; files_struct *fsp; /* we want to give out file handles differently on each new -- cgit