diff options
author | Jeremy Allison <jra@samba.org> | 2006-09-06 21:43:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:43:57 -0500 |
commit | ccdd921e61c95e8e2d1764a74603c863ca2867ba (patch) | |
tree | 12b556fdfec9a44d1af939dd22603d113659012e /source3/nsswitch/winbindd_rpc.c | |
parent | 012c9e9cf9db9147cd95e1abb0f8db0548e0a9d9 (diff) | |
download | samba-ccdd921e61c95e8e2d1764a74603c863ca2867ba.tar.gz samba-ccdd921e61c95e8e2d1764a74603c863ca2867ba.tar.bz2 samba-ccdd921e61c95e8e2d1764a74603c863ca2867ba.zip |
r18191: Fix the online/offline state handling of winbindd.
Instead of trying to do this in the winbindd_cache
entries, add a timed even handler to probe every
5 mins when disconnected.
Fix events to run all pending events, rather than
only one.
Jeremy.
(This used to be commit 7bfbe1b4fb9a91c6678035f220bbf0b4f5afdcac)
Diffstat (limited to 'source3/nsswitch/winbindd_rpc.c')
-rw-r--r-- | source3/nsswitch/winbindd_rpc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/nsswitch/winbindd_rpc.c b/source3/nsswitch/winbindd_rpc.c index 122e2c98e0..7f3ebdeee4 100644 --- a/source3/nsswitch/winbindd_rpc.c +++ b/source3/nsswitch/winbindd_rpc.c @@ -764,19 +764,19 @@ static int get_ldap_seq(const char *server, int port, uint32 *seq) /********************************************************************** Get the sequence number for a Windows AD native mode domain using - LDAP queries + LDAP queries. **********************************************************************/ -static int get_ldap_sequence_number( const char* domain, uint32 *seq) +static int get_ldap_sequence_number(struct winbindd_domain *domain, uint32 *seq) { int ret = -1; int i, port = LDAP_PORT; struct ip_service *ip_list = NULL; int count; - if ( !NT_STATUS_IS_OK(get_sorted_dc_list(domain, &ip_list, &count, + if ( !NT_STATUS_IS_OK(get_sorted_dc_list(domain->name, &ip_list, &count, False)) ) { - DEBUG(3, ("Could not look up dc's for domain %s\n", domain)); + DEBUG(3, ("Could not look up dc's for domain %s\n", domain->name)); return False; } @@ -799,7 +799,7 @@ static int get_ldap_sequence_number( const char* domain, uint32 *seq) goto done; /* add to failed connection cache */ - add_failed_connection_entry( domain, ipstr, + winbind_add_failed_connection_entry( domain, ipstr, NT_STATUS_UNSUCCESSFUL ); } @@ -807,7 +807,7 @@ done: if ( ret == 0 ) { DEBUG(3, ("get_ldap_sequence_number: Retrieved sequence " "number for Domain (%s) from DC (%s:%d)\n", - domain, inet_ntoa(ip_list[i].ip), port)); + domain->name, inet_ntoa(ip_list[i].ip), port)); } SAFE_FREE(ip_list); |