diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-03-25 15:14:02 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-03-29 18:11:17 +0200 |
commit | 408a3eb35a0e61b5d66a3b48ebbd1a6796672d0f (patch) | |
tree | c62ab8a377e8fc5e8ebaa4d7975eed5c53a219bf /source3/winbindd | |
parent | 3e70da3f470eeb122f95477fb48d89939f501b3e (diff) | |
download | samba-408a3eb35a0e61b5d66a3b48ebbd1a6796672d0f.tar.gz samba-408a3eb35a0e61b5d66a3b48ebbd1a6796672d0f.tar.bz2 samba-408a3eb35a0e61b5d66a3b48ebbd1a6796672d0f.zip |
s3:winbindd_cm: use cli_state_is_connected() helper function
metze
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_cm.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 6bdeac1bd7..d9b431a501 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -1607,21 +1607,11 @@ void close_conns_after_fork(void) static bool connection_ok(struct winbindd_domain *domain) { - if (domain->conn.cli == NULL) { - DEBUG(8, ("connection_ok: Connection to %s for domain %s has NULL " - "cli!\n", domain->dcname, domain->name)); - return False; - } - - if (!domain->conn.cli->initialised) { - DEBUG(3, ("connection_ok: Connection to %s for domain %s was never " - "initialised!\n", domain->dcname, domain->name)); - return False; - } + bool ok; - if (domain->conn.cli->fd == -1) { - DEBUG(3, ("connection_ok: Connection to %s for domain %s has died or was " - "never started (fd == -1)\n", + ok = cli_state_is_connected(domain->conn.cli); + if (!ok) { + DEBUG(3, ("connection_ok: Connection to %s for domain %s is not connected\n", domain->dcname, domain->name)); return False; } |