From 03a6137001c418c254505ddab694e1aefc73985d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 19 Jul 2012 13:36:37 +1000 Subject: s3-param: Remove special case for lp_ctdbd_socket(), set CTDB_PATH as default This changes the default based on the #ifdef rather than an override on a parameter value of "" The less special override functions we have the easier it is to merge the loadparm tables. Andrew Bartlett Pair-Programmed-With: Andrew Tridgell Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Thu Jul 19 09:56:01 CEST 2012 on sn-devel-104 --- source3/param/loadparm.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'source3/param') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 00edc3f3d7..2a9900b168 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -4892,7 +4892,12 @@ static void init_globals(bool reinit_globals) string_set(&Globals.szCupsServer, ""); string_set(&Globals.szIPrintServer, ""); +#ifdef CLUSTER_SUPPORT + string_set(&Globals.ctdbdSocket, CTDB_PATH); +#else string_set(&Globals.ctdbdSocket, ""); +#endif + Globals.szClusterAddresses = NULL; Globals.clustering = false; Globals.ctdb_timeout = 0; @@ -5043,7 +5048,6 @@ char *lp_ ## fn_name(TALLOC_CTX *ctx,int i) {return(lp_string((ctx), (LP_SNUM_OK static FN_GLOBAL_BOOL(domain_logons, bDomainLogons) static FN_GLOBAL_BOOL(_readraw, bReadRaw) static FN_GLOBAL_BOOL(_writeraw, bWriteRaw) -static FN_GLOBAL_CONST_STRING(_ctdbd_socket, ctdbdSocket) static FN_GLOBAL_INTEGER(_server_role, ServerRole) /* If lp_statedir() and lp_cachedir() are explicitely set during the @@ -9405,15 +9409,3 @@ int lp_server_role(void) lp_domain_logons(), lp_domain_master_true_or_auto()); } - -const char *lp_ctdbd_socket(void) -{ - const char *result = lp__ctdbd_socket(); - -#ifdef CLUSTER_SUPPORT - if ((result == NULL) || (*result == '\0')) { - return CTDB_PATH; - } -#endif - return result; -} -- cgit