]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
sourcestats: update regression after loading dump file
authorMiroslav Lichvar <mlichvar@redhat.com>
Fri, 19 Aug 2016 14:21:27 +0000 (16:21 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 19 Aug 2016 16:25:02 +0000 (18:25 +0200)
Call SST_DoNewRegression() immediately in SST_LoadFromFile instead of
relying on SRC_ReloadSources().

sources.c
sourcestats.c

index d0e494a5543a9712db782f6df1583040c38cf77b..af177a25f8034e1092f2e29d9248e2e76d781df5 100644 (file)
--- a/sources.c
+++ b/sources.c
@@ -1227,7 +1227,6 @@ SRC_ReloadSources(void)
       LOG(LOGS_WARN, LOGF_Sources, "Could not open dump file %s", filename);
     } else {
       if (SST_LoadFromFile(sources[i]->stats, in)) {
-        SST_DoNewRegression(sources[i]->stats);
       } else {
         LOG(LOGS_WARN, LOGF_Sources, "Problem loading from file %s", filename);
       }
index 1ecff41ba1765dda7030e4d3d13d8f058c0cbd5c..9a6371c1dd79e33ba37a2881622620a6d68e48ee 100644 (file)
@@ -897,9 +897,9 @@ SST_LoadFromFile(SST_Stats inst, FILE *in)
   inst->runs_samples = 0;
 
   find_min_delay_sample(inst);
+  SST_DoNewRegression(inst);
 
   return 1;
-
 }
 
 /* ================================================== */