From 97bb100a765e5dc3983315df11c9654798a76574 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 25 Sep 2015 16:52:58 -0700 Subject: [PATCH] lib: Pass sockname and timeout to ctdbd_probe() Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Sat Oct 3 03:04:39 CEST 2015 on sn-devel-104 --- source3/include/ctdbd_conn.h | 2 +- source3/lib/ctdb_dummy.c | 2 +- source3/lib/ctdbd_conn.c | 6 +++--- source3/lib/util_cluster.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source3/include/ctdbd_conn.h b/source3/include/ctdbd_conn.h index 4dcda6d1569..6c46cdb3d00 100644 --- a/source3/include/ctdbd_conn.h +++ b/source3/include/ctdbd_conn.h @@ -92,6 +92,6 @@ NTSTATUS register_with_ctdbd(struct ctdbd_connection *conn, uint64_t srvid, const uint8_t *msg, size_t msglen, void *private_data), void *private_data); -NTSTATUS ctdbd_probe(void); +NTSTATUS ctdbd_probe(const char *sockname, int timeout); #endif /* _CTDBD_CONN_H */ diff --git a/source3/lib/ctdb_dummy.c b/source3/lib/ctdb_dummy.c index 4b7d20ea4b4..d8658cf1f53 100644 --- a/source3/lib/ctdb_dummy.c +++ b/source3/lib/ctdb_dummy.c @@ -24,7 +24,7 @@ #include "lib/dbwrap/dbwrap_ctdb.h" #include "torture/proto.h" -NTSTATUS ctdbd_probe(void) +NTSTATUS ctdbd_probe(const char *sockname, int timeout) { return NT_STATUS_NOT_IMPLEMENTED; } diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index fb052dde7a1..da2c3a99159 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -1301,7 +1301,7 @@ NTSTATUS ctdb_unwatch(struct ctdbd_connection *conn) return status; } -NTSTATUS ctdbd_probe(void) +NTSTATUS ctdbd_probe(const char *sockname, int timeout) { /* * Do a very early check if ctdbd is around to avoid an abort and core @@ -1310,8 +1310,8 @@ NTSTATUS ctdbd_probe(void) struct ctdbd_connection *conn = NULL; NTSTATUS status; - status = ctdbd_messaging_connection(talloc_tos(), lp_ctdbd_socket(), - lp_ctdb_timeout(), &conn); + status = ctdbd_messaging_connection(talloc_tos(), sockname, timeout, + &conn); /* * We only care if we can connect. diff --git a/source3/lib/util_cluster.c b/source3/lib/util_cluster.c index c1633f6976f..85f006ce2cd 100644 --- a/source3/lib/util_cluster.c +++ b/source3/lib/util_cluster.c @@ -28,7 +28,7 @@ bool cluster_probe_ok(void) if (lp_clustering()) { NTSTATUS status; - status = ctdbd_probe(); + status = ctdbd_probe(lp_ctdbd_socket(), lp_ctdb_timeout()); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("clustering=yes but ctdbd connect failed: " "%s\n", nt_errstr(status))); -- 2.11.4.GIT