From f348d148b463ca61cbc48d2aadeaa099f7150425 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 8 Jun 2011 16:27:06 +1000 Subject: s3-param Remove special case for global_scope() There is no reason this can't be a normal constant string in the loadparm system. (Past reasons were that we didn't have lp_set_cmdline()) Andrew Bartlett --- source3/lib/popt_common.c | 2 +- source3/lib/util_names.c | 27 --------------------------- 2 files changed, 1 insertion(+), 28 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c index 628ed65820..58f0478a76 100644 --- a/source3/lib/popt_common.c +++ b/source3/lib/popt_common.c @@ -143,7 +143,7 @@ static void popt_common_callback(poptContext con, case 'i': if (arg) { - set_global_scope(arg); + lp_set_cmdline("netbios scope", arg); } break; diff --git a/source3/lib/util_names.c b/source3/lib/util_names.c index d8ebf213cf..78d7988367 100644 --- a/source3/lib/util_names.c +++ b/source3/lib/util_names.c @@ -30,35 +30,9 @@ static char *smb_myname; static char *smb_myworkgroup; -static char *smb_scope; static int smb_num_netbios_names; static char **smb_my_netbios_names; -/*********************************************************************** - Allocate and set scope. Ensure upper case. -***********************************************************************/ - -bool set_global_scope(const char *scope) -{ - SAFE_FREE(smb_scope); - smb_scope = SMB_STRDUP(scope); - if (!smb_scope) - return False; - strupper_m(smb_scope); - return True; -} - -/********************************************************************* - Ensure scope is never null string. -*********************************************************************/ - -const char *global_scope(void) -{ - if (!smb_scope) - set_global_scope(""); - return smb_scope; -} - static void free_netbios_names_array(void) { int i; @@ -102,7 +76,6 @@ static bool set_my_netbios_names(const char *name, int i) void gfree_names(void) { gfree_netbios_names(); - SAFE_FREE( smb_scope ); free_netbios_names_array(); free_local_machine_name(); } -- cgit