From: Stefan Metzmacher Date: Tue, 6 Apr 2010 12:42:04 +0000 (+0200) Subject: s3:winbindd_cm: use rpccli_is_connected() helper function X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff9277fb804e7d99a7e80d67c70b962b6199a4e3;p=thirdparty%2Fsamba.git s3:winbindd_cm: use rpccli_is_connected() helper function metze (cherry picked from commit d980c06a994d032a833adc8d56d2f2c037f8fdaf) (cherry picked from commit aa7d54ed04585a183a88363406ed7f3244b24d85) Signed-off-by: Stefan Metzmacher --- diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index ce7f5430125..73f431a4491 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -2003,7 +2003,7 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, conn = &domain->conn; - if (conn->samr_pipe != NULL) { + if (rpccli_is_connected(conn->samr_pipe)) { goto done; } @@ -2187,7 +2187,8 @@ NTSTATUS cm_connect_lsa_tcp(struct winbindd_domain *domain, if (conn->lsa_pipe_tcp && conn->lsa_pipe_tcp->transport->transport == NCACN_IP_TCP && - conn->lsa_pipe_tcp->auth->auth_level == PIPE_AUTH_LEVEL_PRIVACY) { + conn->lsa_pipe_tcp->auth->auth_level == PIPE_AUTH_LEVEL_PRIVACY && + rpccli_is_connected(conn->lsa_pipe_tcp)) { goto done; } @@ -2229,7 +2230,7 @@ NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, conn = &domain->conn; - if (conn->lsa_pipe != NULL) { + if (rpccli_is_connected(conn->lsa_pipe)) { goto done; } @@ -2360,7 +2361,7 @@ NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain, conn = &domain->conn; - if (conn->netlogon_pipe != NULL) { + if (rpccli_is_connected(conn->netlogon_pipe)) { *cli = conn->netlogon_pipe; return NT_STATUS_OK; }