diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-05-12 13:04:15 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-05-12 13:04:15 +0000 |
commit | 9c54ddc7f9adeb63b5bc83fb7cd1b90bf0faf6ec (patch) | |
tree | e112f0e3124b4f1fbfcad65208b9c9ef974c5e34 /source3/smbd/statcache.c | |
parent | 8efe9427516aad533e94bb917de17ecec18b098f (diff) | |
download | samba-9c54ddc7f9adeb63b5bc83fb7cd1b90bf0faf6ec.tar.gz samba-9c54ddc7f9adeb63b5bc83fb7cd1b90bf0faf6ec.tar.xz samba-9c54ddc7f9adeb63b5bc83fb7cd1b90bf0faf6ec.zip |
statcache initialisation fix
pointed out by Elrond
(This used to be commit 572a37534b7ee010aafd7e8bcb9da52957306f97)
Diffstat (limited to 'source3/smbd/statcache.c')
-rw-r--r-- | source3/smbd/statcache.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/smbd/statcache.c b/source3/smbd/statcache.c index 8200c277b3..65a4830016 100644 --- a/source3/smbd/statcache.c +++ b/source3/smbd/statcache.c @@ -221,11 +221,11 @@ BOOL reset_stat_cache( void ) static BOOL initialised; if (!lp_stat_cache()) return True; - if (!initialised) { - initialised = True; - return hash_table_init( &stat_cache, INIT_STAT_CACHE_SIZE, (compare_function)(strcmp)); + if (initialised) { + hash_clear(&stat_cache); } - hash_clear(&stat_cache); - return hash_table_init( &stat_cache, INIT_STAT_CACHE_SIZE, (compare_function)(strcmp)); + initialised = hash_table_init( &stat_cache, INIT_STAT_CACHE_SIZE, + (compare_function)(strcmp)); + return initialised; } /* reset_stat_cache */ |