From 930b3c15da0bb24672d95ed388957b542cb24f89 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 14 Jan 2009 12:25:31 +0100 Subject: s3:messaging: also recreate the local messaging backend in messaging_reinit() This prepares the change to use signal events in the tdb backend. metze --- source3/lib/messages.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/source3/lib/messages.c b/source3/lib/messages.c index f5933cafdb..e4b20c7493 100644 --- a/source3/lib/messages.c +++ b/source3/lib/messages.c @@ -235,13 +235,21 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx, */ NTSTATUS messaging_reinit(struct messaging_context *msg_ctx) { -#ifdef CLUSTER_SUPPORT + NTSTATUS status; + + TALLOC_FREE(msg_ctx->local); + + status = messaging_tdb_init(msg_ctx, msg_ctx, &msg_ctx->local); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0, ("messaging_tdb_init failed: %s\n", + nt_errstr(status))); + return status; + } +#ifdef CLUSTER_SUPPORT TALLOC_FREE(msg_ctx->remote); if (lp_clustering()) { - NTSTATUS status; - status = messaging_ctdbd_init(msg_ctx, msg_ctx, &msg_ctx->remote); -- cgit