From: Gerald (Jerry) Carter Date: Mon, 6 Oct 2008 16:34:45 +0000 (-0500) Subject: idmap_adex: Add log messages to dc_add_domain for easier debugging. X-Git-Tag: samba-4.0.0alpha6~769^2~228^2~64^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=338f658a5a300e21cc69b1a84ebbdc7d63262448;p=thirdparty%2Fsamba.git idmap_adex: Add log messages to dc_add_domain for easier debugging. Part of continue work on BUG 5806. --- diff --git a/source3/winbindd/idmap_adex/domain_util.c b/source3/winbindd/idmap_adex/domain_util.c index ab31ccef7a4..6851503cc8b 100644 --- a/source3/winbindd/idmap_adex/domain_util.c +++ b/source3/winbindd/idmap_adex/domain_util.c @@ -49,6 +49,12 @@ static NTSTATUS dc_add_domain(const char *domain) NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; struct dc_info *dc = NULL; + if (!domain) { + return NT_STATUS_INVALID_PARAMETER; + } + + DEBUG(10,("dc_add_domain: Attempting to add domain %s\n", domain)); + /* Check for duplicates */ dc = dc_list_head(); @@ -73,6 +79,8 @@ static NTSTATUS dc_add_domain(const char *domain) nt_status = NT_STATUS_OK; + DEBUG(5,("dc_add_domain: Successfully added %s\n", domain)); + done: if (!NT_STATUS_IS_OK(nt_status)) { talloc_destroy(dc);