]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Do not reset rrset.bogus stats when called using stats_noreset.
authorRalph Dolmans <ralph@nlnetlabs.nl>
Thu, 3 Aug 2017 10:50:46 +0000 (10:50 +0000)
committerRalph Dolmans <ralph@nlnetlabs.nl>
Thu, 3 Aug 2017 10:50:46 +0000 (10:50 +0000)
git-svn-id: file:///svn/unbound/trunk@4291 be551aaa-1e26-0410-a405-d3ace91eadb9

daemon/stats.c
doc/Changelog

index 599f39bcddda05eea68d6833e0214344c6705d78..50233f4aca17ba31a665e221618f615f46f6a97c 100644 (file)
@@ -123,7 +123,7 @@ void server_stats_log(struct ub_server_stats* stats, struct worker* worker,
 
 /** get rrsets bogus number from validator */
 static size_t
-get_rrset_bogus(struct worker* worker)
+get_rrset_bogus(struct worker* worker, int reset)
 {
        int m = modstack_find(&worker->env.mesh->mods, "validator");
        struct val_env* ve;
@@ -133,7 +133,7 @@ get_rrset_bogus(struct worker* worker)
        ve = (struct val_env*)worker->env.modinfo[m];
        lock_basic_lock(&ve->bogus_lock);
        r = ve->num_rrset_bogus;
-       if(!worker->env.cfg->stat_cumulative)
+       if(reset && !worker->env.cfg->stat_cumulative)
                ve->num_rrset_bogus = 0;
        lock_basic_unlock(&ve->bogus_lock);
        return r;
@@ -169,7 +169,7 @@ server_stats_compile(struct worker* worker, struct ub_stats_info* s, int reset)
        s->svr.qtcp_outgoing = (long long)worker->back->num_tcp_outgoing;
 
        /* get and reset validator rrset bogus number */
-       s->svr.rrset_bogus = (long long)get_rrset_bogus(worker);
+       s->svr.rrset_bogus = (long long)get_rrset_bogus(worker, reset);
 
        /* get cache sizes */
        s->svr.msg_cache_count = (long long)count_slabhash_entries(worker->env.msg_cache);
index 6fc200c293b05af20298ef9a017fbb2eb311311e..cc9e360576abbd8058c33d82fc91543fb76f3efe 100644 (file)
@@ -1,5 +1,6 @@
 3 August 2017: Ralph
        - Remove unused iter_env member (ip6arpa_dname)
+       - Do not reset rrset.bogus stats when called using stats_noreset.
 
 3 August 2017: Wouter
        - Fix #1394: mix of serve-expired and response-ip could cause a crash.