summaryrefslogtreecommitdiff
path: root/source3/lib/dbwrap.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2008-01-16 12:06:34 -0500
committerSimo Sorce <idra@samba.org>2008-01-16 12:06:34 -0500
commit04b2a9e80a8c35e37faf2e0a8e54efb9a084f2e3 (patch)
tree9cb49347eab028a5f65a4f2aa4c61de42cff08fd /source3/lib/dbwrap.c
parent94fdd59f1c2a41b8e737aa8ca8939e9bf2b59a77 (diff)
parent8c41366a98ea96224adc2c108b940075431944fd (diff)
downloadsamba-04b2a9e80a8c35e37faf2e0a8e54efb9a084f2e3.tar.gz
samba-04b2a9e80a8c35e37faf2e0a8e54efb9a084f2e3.tar.bz2
samba-04b2a9e80a8c35e37faf2e0a8e54efb9a084f2e3.zip
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-simo
(This used to be commit 05c22a55a4c052c682a2f2afdb0696504195d18c)
Diffstat (limited to 'source3/lib/dbwrap.c')
-rw-r--r--source3/lib/dbwrap.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/lib/dbwrap.c b/source3/lib/dbwrap.c
index 4e16d18682..001424a6c0 100644
--- a/source3/lib/dbwrap.c
+++ b/source3/lib/dbwrap.c
@@ -20,7 +20,9 @@
*/
#include "includes.h"
-
+#ifdef CLUSTER_SUPPORT
+#include "ctdb_private.h"
+#endif
/*
* Fall back using fetch_locked if no genuine fetch operation is provided
*/
@@ -46,10 +48,16 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx,
int open_flags, mode_t mode)
{
struct db_context *result = NULL;
+#ifdef CLUSTER_SUPPORT
+ const char *sockname = lp_ctdbd_socket();
+#endif
#ifdef CLUSTER_SUPPORT
+ if(!sockname || !*sockname) {
+ sockname = CTDB_PATH;
+ }
- if (lp_clustering()) {
+ if (lp_clustering() && socket_exist(sockname)) {
const char *partname;
/* ctdb only wants the file part of the name */
partname = strrchr(name, '/');