From ccdd921e61c95e8e2d1764a74603c863ca2867ba Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 6 Sep 2006 21:43:31 +0000 Subject: 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) --- source3/nsswitch/winbindd_rpc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source3/nsswitch/winbindd_rpc.c') 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); -- cgit