From: Michael Adam Date: Mon, 14 Jul 2008 08:53:06 +0000 (+0200) Subject: dbwrap: when clustering = yes, don't fall back to db_open_tdb in db_open_trans. X-Git-Tag: samba-3.3.0pre1~550^2~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=013d29c70438bfd43bd11cbb13ba707b256f9b18;p=thirdparty%2Fsamba.git dbwrap: when clustering = yes, don't fall back to db_open_tdb in db_open_trans. Michael --- diff --git a/source/lib/dbwrap.c b/source/lib/dbwrap.c index a686ba6b7c4..6dfe0b37665 100644 --- a/source/lib/dbwrap.c +++ b/source/lib/dbwrap.c @@ -127,8 +127,15 @@ struct db_context *db_open_trans(TALLOC_CTX *mem_ctx, sockname = CTDB_PATH; } - if (lp_clustering() && socket_exist(sockname)) { + if (lp_clustering()) { const char *partname; + + if (!socket_exist(sockname)) { + DEBUG(1, ("ctdb socket does not exist - is ctdb not " + "running?\n")); + return NULL; + } + /* ctdb only wants the file part of the name */ partname = strrchr(name, '/'); if (partname) {