From: Stefan Metzmacher Date: Wed, 14 Jan 2009 11:25:31 +0000 (+0100) Subject: s3:messaging: also recreate the local messaging backend in messaging_reinit() X-Git-Tag: samba-4.0.0alpha7~465 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=930b3c15da0bb24672d95ed388957b542cb24f89;p=thirdparty%2Fsamba.git s3:messaging: also recreate the local messaging backend in messaging_reinit() This prepares the change to use signal events in the tdb backend. metze --- diff --git a/source3/lib/messages.c b/source3/lib/messages.c index f5933cafdbc..e4b20c74934 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);