From ffdfcfb514c1a0849ba334ae6b9b00d3ad3c2227 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 21 Sep 2010 20:56:23 -0700 Subject: s3-dsgetdcname: always pass in messaging context. Volker, please check. Guenther --- source3/libsmb/dsgetdcname.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'source3/libsmb/dsgetdcname.c') diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c index 2803e74b66..4d0310fd7c 100644 --- a/source3/libsmb/dsgetdcname.c +++ b/source3/libsmb/dsgetdcname.c @@ -900,30 +900,6 @@ static NTSTATUS process_dc_dns(TALLOC_CTX *mem_ctx, /**************************************************************** ****************************************************************/ -static struct event_context *ev_context(void) -{ - static struct event_context *ctx; - - if (!ctx && !(ctx = event_context_init(NULL))) { - smb_panic("Could not init event context"); - } - return ctx; -} - -/**************************************************************** -****************************************************************/ - -static struct messaging_context *msg_context(TALLOC_CTX *mem_ctx) -{ - static struct messaging_context *ctx; - - if (!ctx && !(ctx = messaging_init(mem_ctx, procid_self(), - ev_context()))) { - smb_panic("Could not init messaging context"); - } - return ctx; -} - /**************************************************************** ****************************************************************/ @@ -948,8 +924,8 @@ static NTSTATUS process_dc_netbios(TALLOC_CTX *mem_ctx, NETLOGON_NT_VERSION_5 | NETLOGON_NT_VERSION_5EX_WITH_IP; - if (!msg_ctx) { - msg_ctx = msg_context(mem_ctx); + if (msg_ctx == NULL) { + return NT_STATUS_INVALID_PARAMETER; } if (flags & DS_PDC_REQUIRED) { -- cgit