From 8f0c86373241cb9e308ed4b91b2b51d6e67fd88f Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 6 Aug 2010 12:32:30 +0200 Subject: s3: fail db_open_ctdb if ctdb is not around --- source3/lib/dbwrap_ctdb.c | 5 +++++ 1 file changed, 5 insertions(+) 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)); -- cgit