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/dir.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'source3/smbd/dir.c') diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index c2735c032a..2b996a41cf 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -19,6 +19,7 @@ */ #include "includes.h" +#include "smbd/globals.h" /* This module implements directory related functions for Samba. @@ -61,9 +62,6 @@ struct dptr_struct { bool did_stat; /* Optimisation for non-wcard searches. */ }; -static struct bitmap *dptr_bmap; -static struct dptr_struct *dirptrs; -static int dirhandles_open = 0; #define INVALID_DPTR_KEY (-3) @@ -119,17 +117,13 @@ bool make_dir_struct(TALLOC_CTX *ctx, void init_dptrs(void) { - static bool dptrs_init=False; - - if (dptrs_init) + if (dptr_bmap) return; dptr_bmap = bitmap_allocate(MAX_DIRECTORY_HANDLES); if (!dptr_bmap) exit_server("out of memory in init_dptrs"); - - dptrs_init = True; } /**************************************************************************** -- cgit