cache stats were detached when flushing cache

This commit is contained in:
Evan Hunt
2012-05-14 12:20:34 -07:00
parent d878b8d87c
commit d81b6b94c4
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -1167,6 +1167,7 @@ dns_cache_flush(dns_cache_t *cache) {
}
dns_db_detach(&cache->db);
cache->db = db;
dns_db_setcachestats(cache->db, cache->stats);
UNLOCK(&cache->cleaner.lock);
UNLOCK(&cache->lock);
+1 -1
View File
@@ -706,6 +706,7 @@ free_rbtdb_callback(isc_task_t *task, isc_event_t *event) {
static void
update_cachestats(dns_rbtdb_t *rbtdb, isc_result_t result) {
INSIST(IS_CACHE(rbtdb));
INSIST(rbtdb->cachestats != NULL);
switch (result) {
case ISC_R_SUCCESS:
@@ -7633,7 +7634,6 @@ dns_rbtdb_create
}
rbtdb->cachestats = NULL;
rbtdb->rrsetstats = NULL;
if (IS_CACHE(rbtdb)) {
result = dns_rdatasetstats_create(mctx, &rbtdb->rrsetstats);