s3: Fix unnecessary traversing winbindd_cache.tdb in SIGHUP handler.
authorBo Yang <boyang@samba.org>
Sat, 6 Mar 2010 12:58:23 +0000 (20:58 +0800)
committerBo Yang <boyang@samba.org>
Sat, 6 Mar 2010 12:58:23 +0000 (20:58 +0800)
Signed-off-by: Bo Yang <boyang@samba.org>
source3/winbindd/winbindd_cache.c

index 0e17253b7deb21c47f7263ebcef7d7e01a8b2e08..db2f3b6b8b3607ce1df19305faf3a7592fc997ba 100644 (file)
@@ -3042,6 +3042,12 @@ bool wcache_invalidate_cache_noinit(void)
                if (cache) {
                        if (cache->tdb) {
                                tdb_traverse(cache->tdb, traverse_fn, NULL);
+                               /*
+                                * Flushing cache has nothing to with domains.
+                                * return here if we successfully flushed once.
+                                * To avoid unnecessary traversing the cache.
+                                */
+                               return true;
                        } else {
                                return false;
                        }