diff options
author | Michael Adam <obnox@samba.org> | 2008-07-14 10:53:06 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-07-15 13:55:33 +0200 |
commit | 56681032b288ed924b40ab353c632a1fb153759d (patch) | |
tree | cfa65ee1b9e8a2515d36ed580d045fb53e3bdb9e /source3/lib | |
parent | 32df537a24f8f24a90dd9f159efc5e2bf527e43f (diff) | |
download | samba-56681032b288ed924b40ab353c632a1fb153759d.tar.gz samba-56681032b288ed924b40ab353c632a1fb153759d.tar.bz2 samba-56681032b288ed924b40ab353c632a1fb153759d.zip |
dbwrap: when clustering = yes, don't fall back to db_open_tdb in db_open_trans.
Michael
(This used to be commit 013d29c70438bfd43bd11cbb13ba707b256f9b18)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/dbwrap.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/lib/dbwrap.c b/source3/lib/dbwrap.c index a686ba6b7c..6dfe0b3766 100644 --- a/source3/lib/dbwrap.c +++ b/source3/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) { |