s3:smbd: use new function cluster_probe_ok()
authorMichael Adam <obnox@samba.org>
Thu, 17 Oct 2013 13:15:51 +0000 (15:15 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 17 Oct 2013 21:22:29 +0000 (23:22 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/server.c
source3/wscript_build

index 3536f18cf4983aab738212e5e793fd110f3b242d..8173a6294d905d431f5e7893477009f27f6fdee5 100644 (file)
@@ -31,6 +31,7 @@
 #include "secrets.h"
 #include "memcache.h"
 #include "ctdbd_conn.h"
+#include "util_cluster.h"
 #include "printing/queue_process.h"
 #include "rpc_server/rpc_service_setup.h"
 #include "rpc_server/rpc_config.h"
@@ -1214,15 +1215,8 @@ extern void build_options(bool screen);
                exit(1);
        }
 
-       if (lp_clustering()) {
-               NTSTATUS status;
-
-               status = ctdbd_probe();
-               if (!NT_STATUS_IS_OK(status)) {
-                       DEBUG(0, ("clustering=yes but ctdbd connect failed: "
-                                 "%s\n", nt_errstr(status)));
-                       exit(1);
-               }
+       if (!cluster_probe_ok()) {
+               exit(1);
        }
 
        /* Init the security context and global current_user */
index dd2e054e53d2871a70eb552c6f332c4cbe49e20f..4803e9b13e3c9d6c6c8b3d1cf51ae68cde3303f0 100755 (executable)
@@ -285,6 +285,7 @@ bld.SAMBA3_SUBSYSTEM('samba3core',
                    lib/ctdb_packet.c
                    lib/ctdbd_conn.c
                    lib/ctdb_conn.c
+                   lib/util_cluster.c
                    lib/msg_channel.c
                    lib/id_cache.c
                    lib/talloc_dict.c