summaryrefslogtreecommitdiff
path: root/source4/utils
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-08 23:32:37 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:48:56 +0100
commitdd7e5ed88c48f4ee39e53be07c8839791e914e45 (patch)
treefca88a741257b2f5165f3762de6c44053888fc3e /source4/utils
parent75ac6cd318ae58aacc77785ba93af50bfe354b63 (diff)
downloadsamba-dd7e5ed88c48f4ee39e53be07c8839791e914e45.tar.gz
samba-dd7e5ed88c48f4ee39e53be07c8839791e914e45.tar.bz2
samba-dd7e5ed88c48f4ee39e53be07c8839791e914e45.zip
r26352: Don't make lp_load create a new context.
(This used to be commit d0d5c1a823a6601292c061dba2b6f4bde2b9e3dd)
Diffstat (limited to 'source4/utils')
-rw-r--r--source4/utils/testparm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/utils/testparm.c b/source4/utils/testparm.c
index bd4bc79240..fe8cc7124a 100644
--- a/source4/utils/testparm.c
+++ b/source4/utils/testparm.c
@@ -141,7 +141,7 @@ static int do_share_checks(struct loadparm_context *lp_ctx, const char *cname, c
if (!parameter_name) {
lp_dump_one(stdout, show_defaults, service);
} else {
- ret = !lp_dump_a_parameter(lp_ctx, service, parameter_name, stdout, (service == NULL));
+ ret = !lp_dump_a_parameter(lp_ctx, service, parameter_name, stdout);
}
} else {
lp_dump(lp_ctx, stdout, show_defaults, lp_numservices(lp_ctx));
@@ -233,13 +233,15 @@ static int do_share_checks(struct loadparm_context *lp_ctx, const char *cname, c
set_local_machine_name(new_local_machine, True);
}
*/
+
+ lp_ctx = global_loadparm;
/* We need this to force the output */
- lp_set_cmdline(global_loadparm, "log level", "2");
+ lp_set_cmdline(lp_ctx, "log level", "2");
- fprintf(stderr, "Loaded smb config files from %s\n", lp_configfile(global_loadparm));
+ fprintf(stderr, "Loaded smb config files from %s\n", lp_configfile(lp_ctx));
- if (!lp_load(talloc_autofree_context(), lp_configfile(global_loadparm), &lp_ctx)) {
+ if (!lp_load(lp_ctx, lp_configfile(lp_ctx))) {
fprintf(stderr,"Error loading services.\n");
return(1);
}