From 13059beb245b9d088d523473bbc0d564ed88ed69 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 11 Jan 2002 10:05:34 +0000 Subject: force the time difference in cache comparisons to be unsigned to cope with the local machine time changing (This used to be commit 116c0a0e3baa6a100a816f1ff2722782941ac3dc) --- source3/nsswitch/winbindd_cache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c index 15964f2cce..70b730e0b9 100644 --- a/source3/nsswitch/winbindd_cache.c +++ b/source3/nsswitch/winbindd_cache.c @@ -173,9 +173,12 @@ static BOOL wcache_server_down(struct winbindd_domain *domain) static void refresh_sequence_number(struct winbindd_domain *domain, BOOL force) { NTSTATUS status; + unsigned time_diff; + + time_diff = time(NULL) - domain->last_seq_check; /* see if we have to refetch the domain sequence number */ - if (!force && (time(NULL) - domain->last_seq_check < lp_winbind_cache_time())) { + if (!force && (time_diff < lp_winbind_cache_time())) { return; } -- cgit