diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-01-07 21:45:49 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-01-07 21:45:49 +0100 |
commit | 66fa21ef73464188f5cb20e5fc96c5aa35d434b6 (patch) | |
tree | fa54883af4c07ac6886222aa751e97efe2753f8c /source3/winbindd/winbindd_cache.c | |
parent | ea1ff069a53a53b0251179dca30ce52dd8b56a23 (diff) | |
parent | 45c67ff244a4a40b8fd099b3cbdc135a527c30eb (diff) | |
download | samba-66fa21ef73464188f5cb20e5fc96c5aa35d434b6.tar.gz samba-66fa21ef73464188f5cb20e5fc96c5aa35d434b6.tar.bz2 samba-66fa21ef73464188f5cb20e5fc96c5aa35d434b6.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/winbindd/winbindd_cache.c')
-rw-r--r-- | source3/winbindd/winbindd_cache.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index 1ae7966bc3..863852e837 100644 --- a/source3/winbindd/winbindd_cache.c +++ b/source3/winbindd/winbindd_cache.c @@ -486,7 +486,9 @@ static void refresh_sequence_number(struct winbindd_domain *domain, bool force) time_diff = t - domain->last_seq_check; /* see if we have to refetch the domain sequence number */ - if (!force && (time_diff < cache_time)) { + if (!force && (time_diff < cache_time) && + (domain->sequence_number != DOM_SEQUENCE_NONE) && + NT_STATUS_IS_OK(domain->last_status)) { DEBUG(10, ("refresh_sequence_number: %s time ok\n", domain->name)); goto done; } @@ -495,8 +497,11 @@ static void refresh_sequence_number(struct winbindd_domain *domain, bool force) /* this will update the timestamp as well */ status = fetch_cache_seqnum( domain, t ); - if ( NT_STATUS_IS_OK(status) ) - goto done; + if (NT_STATUS_IS_OK(status) && + (domain->sequence_number != DOM_SEQUENCE_NONE) && + NT_STATUS_IS_OK(domain->last_status)) { + goto done; + } /* important! make sure that we know if this is a native mode domain or not. And that we can contact it. */ |