git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74ea870
)
v3-4-ctdb: fail db_open_ctdb if ctdb is not around
author
Volker Lendecke
<vl@samba.org>
Fri, 6 Aug 2010 10:32:30 +0000
(12:32 +0200)
committer
Volker Lendecke
<vl@samba.org>
Fri, 6 Aug 2010 10:34:31 +0000
(12:34 +0200)
source3/lib/dbwrap_ctdb.c
patch
|
blob
|
history
diff --git
a/source3/lib/dbwrap_ctdb.c
b/source3/lib/dbwrap_ctdb.c
index 329d63c5a5e5ccb14729b9b43b287198b9a8c4c0..6887575d44059339768577259b3cd171c5fd63e5 100644
(file)
--- a/
source3/lib/dbwrap_ctdb.c
+++ b/
source3/lib/dbwrap_ctdb.c
@@
-1295,6
+1295,11
@@
struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
db_ctdb->db = result;
conn = messaging_ctdbd_connection();
+ 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));