summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-03-30 15:37:33 +0200
committerVolker Lendecke <vl@samba.org>2012-04-17 10:21:00 +0200
commita49ac23a10bfe4098cb46b39d3152571a2562a38 (patch)
tree3e6ce06c9f1837f6ade3f956f020e4f9d0734f87 /source3/param
parent6235b761f6eab3ec3d8492ba146e8d9efe6944a6 (diff)
downloadsamba-a49ac23a10bfe4098cb46b39d3152571a2562a38.tar.gz
samba-a49ac23a10bfe4098cb46b39d3152571a2562a38.tar.bz2
samba-a49ac23a10bfe4098cb46b39d3152571a2562a38.zip
s3: Return CTDB_PATH from lp_ctdbd_socket()
All callers had that fallback
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index dbf47c0320..e781048d8e 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -78,6 +78,10 @@
#include <cups/http.h>
#endif
+#ifdef CLUSTER_SUPPORT
+#include "ctdb_private.h"
+#endif
+
bool bLoaded = false;
extern userdom_struct current_user_info;
@@ -5335,7 +5339,7 @@ int lp_cups_encrypt(void)
}
FN_GLOBAL_STRING(iprint_server, szIPrintServer)
FN_GLOBAL_INTEGER(cups_connection_timeout, cups_connection_timeout)
-FN_GLOBAL_CONST_STRING(ctdbd_socket, ctdbdSocket)
+static FN_GLOBAL_CONST_STRING(_ctdbd_socket, ctdbdSocket)
FN_GLOBAL_LIST(cluster_addresses, szClusterAddresses)
FN_GLOBAL_BOOL(clustering, clustering)
FN_GLOBAL_INTEGER(ctdb_timeout, ctdb_timeout)
@@ -9648,3 +9652,15 @@ 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;
+}