lib: Pass sockname and timeout to ctdbd_probe()
authorVolker Lendecke <vl@samba.org>
Fri, 25 Sep 2015 23:52:58 +0000 (16:52 -0700)
committerJeremy Allison <jra@samba.org>
Sat, 3 Oct 2015 01:04:39 +0000 (03:04 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Oct  3 03:04:39 CEST 2015 on sn-devel-104

source3/include/ctdbd_conn.h
source3/lib/ctdb_dummy.c
source3/lib/ctdbd_conn.c
source3/lib/util_cluster.c

index 4dcda6d1569ef51849af70c4ee98cd2585fd54a3..6c46cdb3d00f69c60d10318e105b32d9b04d3ea8 100644 (file)
@@ -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 */
index 4b7d20ea4b45ee854fc644d56a37d58cc727587f..d8658cf1f53c56d6e9361e7b8e9e61d324d3cadd 100644 (file)
@@ -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;
 }
index fb052dde7a101361a7f1b6cdbddb8ff4ebc90f26..da2c3a99159405e720325cdb9035b12953730861 100644 (file)
@@ -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.
index c1633f6976ff5a2c1a87a7596b4d4bff86fa6117..85f006ce2cd78139525aa60a2e0dd31bcd9df57c 100644 (file)
@@ -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)));