summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-06 12:32:30 +0200
committerVolker Lendecke <vl@samba.org>2010-08-06 14:15:04 +0200
commit8f0c86373241cb9e308ed4b91b2b51d6e67fd88f (patch)
tree5d077dafbd794b441c3399356449f07ecc9d26d5 /source3/lib
parentfe5f4d91ce5067c4222648967719f67f6e670642 (diff)
downloadsamba-8f0c86373241cb9e308ed4b91b2b51d6e67fd88f.tar.gz
samba-8f0c86373241cb9e308ed4b91b2b51d6e67fd88f.tar.bz2
samba-8f0c86373241cb9e308ed4b91b2b51d6e67fd88f.zip
s3: fail db_open_ctdb if ctdb is not around
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/dbwrap_ctdb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/lib/dbwrap_ctdb.c b/source3/lib/dbwrap_ctdb.c
index 321a071aaa..ceaadd2256 100644
--- a/source3/lib/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap_ctdb.c
@@ -1292,6 +1292,11 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
db_ctdb->db = result;
conn = messaging_ctdbd_connection(procid_self());
+ if (conn == NULL) {
+ DEBUG(1, ("Could not connect to ctdb\n"));
+ TALLOC_FREE(result);
+ return NULL;
+ }
if (!NT_STATUS_IS_OK(ctdbd_db_attach(conn, name, &db_ctdb->db_id, tdb_flags))) {
DEBUG(0, ("ctdbd_db_attach failed for %s\n", name));