diff options
Diffstat (limited to 'source3/libsmb/dsgetdcname.c')
-rw-r--r-- | source3/libsmb/dsgetdcname.c | 28 |
1 files changed, 2 insertions, 26 deletions
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) { |