diff options
author | Volker Lendecke <vl@samba.org> | 2008-07-03 15:58:37 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-07-03 15:59:19 +0200 |
commit | c4503f5658282169f38ac87fd2d82a9b67273037 (patch) | |
tree | 0beb76987ae4f4a4d6d1ea1bbcd625470166112e /source3/utils | |
parent | 962beb287239b525ed4828ae13b85de31448d256 (diff) | |
download | samba-c4503f5658282169f38ac87fd2d82a9b67273037.tar.gz samba-c4503f5658282169f38ac87fd2d82a9b67273037.tar.bz2 samba-c4503f5658282169f38ac87fd2d82a9b67273037.zip |
Return timed out entries from gencache_get if timeout param != NULL
net cache get was the only one interested in the timeout. That single caller
can take care of the timeout itself then.
With this API change idmap_cache.c can be converted to gencache.
(This used to be commit 2954b2be563149380e1fae7fe088b98d6cbd42e7)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_cache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/utils/net_cache.c b/source3/utils/net_cache.c index 4e9ae18c0d..21fcc9155d 100644 --- a/source3/utils/net_cache.c +++ b/source3/utils/net_cache.c @@ -225,7 +225,8 @@ static int net_cache_get(struct net_context *c, int argc, const char **argv) return -1; } - if (gencache_get(keystr, &valuestr, &timeout)) { + if (gencache_get(keystr, &valuestr, &timeout) + && (timeout > time(NULL))) { print_cache_entry(keystr, valuestr, timeout, NULL); return 0; } |