]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
local: use common function to invoke parameter change handlers
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 19 Aug 2014 08:56:53 +0000 (10:56 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 19 Aug 2014 09:30:32 +0000 (11:30 +0200)
This was missing in commit b69b648d.

local.c

diff --git a/local.c b/local.c
index 29ab0f3cd05bc6c9cbc2cef5b3a3d777d5c27d4f..ee70dacd6cd49134ee0a6a5fbc0c5af7ab89e45e 100644 (file)
--- a/local.c
+++ b/local.c
@@ -493,7 +493,6 @@ LCL_NotifyExternalTimeStep(struct timeval *raw, struct timeval *cooked,
 void
 LCL_AccumulateFrequencyAndOffset(double dfreq, double doffset, double corr_rate)
 {
-  ChangeListEntry *ptr;
   struct timeval raw, cooked;
   double old_freq_ppm;
 
@@ -519,11 +518,7 @@ LCL_AccumulateFrequencyAndOffset(double dfreq, double doffset, double corr_rate)
   (*drv_accrue_offset)(doffset, corr_rate);
 
   /* Dispatch to all handlers */
-  for (ptr = change_list.next; ptr != &change_list; ptr = ptr->next) {
-    (ptr->handler)(&raw, &cooked, dfreq, doffset, 0, ptr->anything);
-  }
-
-
+  invoke_parameter_change_handlers(&raw, &cooked, dfreq, doffset, LCL_ChangeAdjust);
 }
 
 /* ================================================== */