From e2d39aefae41da5a5614c5061d2aa30f40c5d65d Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 5 Apr 2016 10:11:44 +0200 Subject: [PATCH] lib: Use ctdbd_init_connection in messaging_ctdbd_init Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- source3/lib/messages_ctdbd.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/source3/lib/messages_ctdbd.c b/source3/lib/messages_ctdbd.c index 48563a832cd..a61c7739577 100644 --- a/source3/lib/messages_ctdbd.c +++ b/source3/lib/messages_ctdbd.c @@ -178,12 +178,20 @@ int messaging_ctdbd_init(struct messaging_context *msg_ctx, return ENOMEM; } - ret = ctdbd_messaging_connection(ctx, lp_ctdbd_socket(), - lp_ctdb_timeout(), &ctx->conn); + ret = ctdbd_init_connection(ctx, lp_ctdbd_socket(), + lp_ctdb_timeout(), &ctx->conn); if (ret != 0) { - DEBUG(10, ("ctdbd_messaging_connection failed: %s\n", - strerror(ret))); + DBG_DEBUG("ctdbd_init_connection failed: %s\n", + strerror(ret)); + TALLOC_FREE(result); + return ret; + } + + ret = register_with_ctdbd(ctx->conn, MSG_SRVID_SAMBA, NULL, NULL); + if (ret != 0) { + DBG_DEBUG("Could not register MSG_SRVID_SAMBA: %s\n", + strerror(ret)); TALLOC_FREE(result); return ret; } -- 2.47.3