diff options
author | Garming Sam <garming@catalyst.net.nz> | 2014-02-21 17:59:19 +1300 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-05-07 19:49:16 +0200 |
commit | 74e0a37fd34791099a32591ab607e9444fd441fe (patch) | |
tree | ebfaac39ccf04ce22de24e24b8636a0d3f37dd0d /lib/param/loadparm.c | |
parent | 509cc45c95fa1b5d4d89afc687d09748dddec404 (diff) | |
download | samba-74e0a37fd34791099a32591ab607e9444fd441fe.tar.gz samba-74e0a37fd34791099a32591ab607e9444fd441fe.tar.xz samba-74e0a37fd34791099a32591ab607e9444fd441fe.zip |
param: setup more variables in for the temporary loadparm context for the special functions
In doing so, the loadparm context definition is now also moved to the loadparm.h header.
This means that the loadparm context is no longer private to the
lib/param code and that the source3 code can now override the values
within it.
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/param/loadparm.c')
-rw-r--r-- | lib/param/loadparm.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index 63b8edd201a..2b8ea237a06 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -93,26 +93,6 @@ static bool defaults_saved = false; #include "lib/param/param_table.c" -/* local variables */ -struct loadparm_context { - const char *szConfigFile; - struct loadparm_global *globals; - struct loadparm_service **services; - struct loadparm_service *sDefault; - struct smb_iconv_handle *iconv_handle; - int iNumServices; - struct loadparm_service *currentService; - bool bInGlobalSection; - struct file_lists *file_lists; - unsigned int flags[NUMPARAMETERS]; - bool loaded; - bool refuse_free; - bool global; /* Is this the global context, which may set - * global variables such as debug level etc? */ - const struct loadparm_s3_helpers *s3_fns; -}; - - struct loadparm_service *lpcfg_default_service(struct loadparm_context *lp_ctx) { if (lp_ctx->s3_fns) { @@ -2079,6 +2059,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx) lp_ctx->bInGlobalSection = true; lp_ctx->globals = talloc_zero(lp_ctx, struct loadparm_global); lp_ctx->sDefault = talloc_zero(lp_ctx, struct loadparm_service); + lp_ctx->flags = talloc_zero_array(lp_ctx, unsigned int, NUMPARAMETERS); lp_ctx->sDefault->iMaxPrintJobs = 1000; lp_ctx->sDefault->bAvailable = true; |