Remove global_loadparm.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 2 Nov 2008 18:33:34 +0000 (19:33 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 2 Nov 2008 18:33:34 +0000 (19:33 +0100)
source4/lib/cmdline/popt_common.c
source4/lib/cmdline/popt_credentials.c
source4/param/loadparm.c
source4/param/param.h

index 563bc0f3995ee8249e67129e64cac06d00f20448..712d99996c92b5666f368f86c067df99c8f14018 100644 (file)
@@ -78,11 +78,7 @@ static void popt_samba_callback(poptContext con,
                pname++;
 
        if (reason == POPT_CALLBACK_REASON_PRE) {
-               if (global_loadparm != NULL) {
-                       cmdline_lp_ctx = global_loadparm;
-               } else {
-                       cmdline_lp_ctx = global_loadparm = loadparm_init(talloc_autofree_context());
-               }
+               cmdline_lp_ctx = loadparm_init(talloc_autofree_context());
 
                /* Hook for 'almost the first thing to do in a samba program' here */
                /* setup for panics */
index de5ea7c1b675e16a14e687974d384bf088d421e6..42ecac1eaae9c6ae3dfd50b3bb56203254a43cb9 100644 (file)
@@ -60,7 +60,7 @@ static void popt_common_credentials_callback(poptContext con,
        }
        
        if (reason == POPT_CALLBACK_REASON_POST) {
-               cli_credentials_guess(cmdline_credentials, global_loadparm);
+               cli_credentials_guess(cmdline_credentials, cmdline_lp_ctx);
 
                if (!dont_ask) {
                        cli_credentials_set_cmdline_callbacks(cmdline_credentials);
index 79132a388aa5c27fca3c5f2e9a4c23e097b66d81..766194570c83af45945cb97e572a999bb5612c3d 100644 (file)
@@ -228,8 +228,6 @@ struct loadparm_service
 };
 
 
-struct loadparm_context *global_loadparm = NULL;
-
 #define NUMPARAMETERS (sizeof(parm_table) / sizeof(struct parm_struct))
 
 
index 80bb5ff1283cb247598338fd7a92912a39322bac..ba0dbfd0fa3c6cfb2d9e0e3ee4093fad9836fb2c 100644 (file)
@@ -71,8 +71,6 @@ struct gensec_settings;
 
 void reload_charcnv(struct loadparm_context *lp_ctx);
 
-extern _DEPRECATED_ struct loadparm_context *global_loadparm;
-
 struct loadparm_service *lp_default_service(struct loadparm_context *lp_ctx);
 struct parm_struct *lp_parm_table(void);
 int lp_server_role(struct loadparm_context *);