r24113: some little fixes to get the correct error message
authorStefan Metzmacher <metze@samba.org>
Wed, 1 Aug 2007 10:03:13 +0000 (10:03 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:29:08 +0000 (12:29 -0500)
when using "clustering = yes" and ctdbd isn't running

metze
(This used to be commit c5f020ba1fdefe0422dd466b9c68ff67c74ceddd)

source3/lib/dbwrap_ctdb.c
source3/lib/messages_ctdbd.c

index fff5ad1d9fc4a6fa00fea640f99588f492d3d134..73d8eeffea10cd256c5b42f588ee12aeb7804bea 100644 (file)
@@ -363,7 +363,11 @@ static struct ctdbd_connection *db_ctdbd_conn(struct db_ctdb_ctx *ctx)
        }
 
        if (ctx->conn == NULL) {
-               ctdbd_init_connection(ctx, &ctx->conn);
+               NTSTATUS status;
+               status = ctdbd_init_connection(ctx, &ctx->conn);
+               if (!NT_STATUS_IS_OK(status)) {
+                       return NULL;
+               }
                set_my_vnn(ctdbd_vnn(ctx->conn));
        }
 
index dbdc8db3c1e022110a22acb1f93af3a0ed912748..6e9b934a7576a9d922bfa1346492223a76b803e1 100644 (file)
@@ -88,7 +88,7 @@ NTSTATUS messaging_ctdbd_init(struct messaging_context *msg_ctx,
        status = ctdbd_messaging_connection(ctx, &ctx->conn);
 
        if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(10, ("ctdbd_init_connection failed: %s\n",
+               DEBUG(10, ("ctdbd_messaging_connection failed: %s\n",
                           nt_errstr(status)));
                TALLOC_FREE(result);
                return status;