summaryrefslogtreecommitdiffstats
path: root/ctdb/common/ctdb_client.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-04-18 11:55:54 +1000
committerAndrew Tridgell <tridge@samba.org>2007-04-18 11:55:54 +1000
commit7a02b09b01363fdf7e12f10eb46f18492823a2a9 (patch)
tree56baf130d0576610d5be1195884860ebc77d1993 /ctdb/common/ctdb_client.c
parentaac20642b28ea19003606275cfa2b9902c4b566e (diff)
downloadsamba-7a02b09b01363fdf7e12f10eb46f18492823a2a9.tar.gz
samba-7a02b09b01363fdf7e12f10eb46f18492823a2a9.tar.xz
samba-7a02b09b01363fdf7e12f10eb46f18492823a2a9.zip
started adding a cleaner daemon finish method
(This used to be ctdb commit 5ef0cd83d7f24616dad85cece485b770376ecd45)
Diffstat (limited to 'ctdb/common/ctdb_client.c')
-rw-r--r--ctdb/common/ctdb_client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ctdb/common/ctdb_client.c b/ctdb/common/ctdb_client.c
index aca243eda1..4e5e7701cc 100644
--- a/ctdb/common/ctdb_client.c
+++ b/ctdb/common/ctdb_client.c
@@ -434,6 +434,11 @@ void ctdb_connect_wait(struct ctdb_context *ctdb)
r.hdr.operation = CTDB_REQ_CONNECT_WAIT;
DEBUG(3,("ctdb_connect_wait: sending to ctdbd\n"));
+
+ /* if the domain socket is not yet open, open it */
+ if (ctdb->daemon.sd==-1) {
+ ux_socket_connect(ctdb);
+ }
res = ctdb_queue_send(ctdb->daemon.queue, (uint8_t *)&r.hdr, r.hdr.length);
if (res != 0) {