]> git.sur5r.net Git - openldap/commitdiff
ITS#6360 fix cache cursize count
authorHoward Chu <hyc@openldap.org>
Wed, 4 Nov 2009 00:47:45 +0000 (00:47 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 4 Nov 2009 00:47:45 +0000 (00:47 +0000)
servers/slapd/back-bdb/cache.c

index fab4b1e09ede616cac430e7e83a422379f023feb..bff580396e1cb07a7028008c40a83ac5dc3c685d 100644 (file)
@@ -972,6 +972,9 @@ load1:
                                 */
                                if ( (*eip)->bei_state & CACHE_ENTRY_NOT_CACHED ) {
                                        (*eip)->bei_state &= ~CACHE_ENTRY_NOT_CACHED;
+                                       ldap_pvt_thread_mutex_lock( &bdb->bi_cache.c_count_mutex );
+                                       ++bdb->bi_cache.c_cursize;
+                                       ldap_pvt_thread_mutex_unlock( &bdb->bi_cache.c_count_mutex );
                                }
                                flag &= ~ID_NOCACHE;
                        }