Portable build framework for OpenNTPD
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1003 B

8 years ago
8 years ago
8 years ago
8 years ago
  1. From 97c083b8d9db34198c98561d3dbc746eb48804ba Mon Sep 17 00:00:00 2001
  2. From: Brent Cook <busterb@gmail.com>
  3. Date: Mon, 4 May 2015 04:27:29 -0500
  4. Subject: [PATCH 10/12] add a method for updating the realtime clock on sync
  5. from Christian Weisgerber
  6. ---
  7. src/usr.sbin/ntpd/ntpd.c | 2 ++
  8. 1 file changed, 2 insertions(+)
  9. diff --git a/src/usr.sbin/ntpd/ntpd.c b/src/usr.sbin/ntpd/ntpd.c
  10. index c416c04..4d49226 100644
  11. --- a/src/usr.sbin/ntpd/ntpd.c
  12. +++ b/src/usr.sbin/ntpd/ntpd.c
  13. @@ -55,6 +55,7 @@ const char *ctl_lookup_option(char *, const char **);
  14. void show_status_msg(struct imsg *);
  15. void show_peer_msg(struct imsg *, int);
  16. void show_sensor_msg(struct imsg *, int);
  17. +void update_time_sync_status(int);
  18. volatile sig_atomic_t quit = 0;
  19. volatile sig_atomic_t reconfig = 0;
  20. @@ -498,6 +499,7 @@ ntpd_adjtime(double d)
  21. else if (!firstadj && olddelta.tv_sec == 0 && olddelta.tv_usec == 0)
  22. synced = 1;
  23. firstadj = 0;
  24. + update_time_sync_status(synced);
  25. return (synced);
  26. }
  27. --
  28. 2.7.0