diff options
author | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2009-06-06 18:14:26 +0000 |
---|---|---|
committer | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2009-06-06 18:14:26 +0000 |
commit | 6b79b60efb12868c2d683e7f28e12ff86ad85ed2 (patch) | |
tree | 9ee375cda635bd2d509438cf2fbe2e7599355f3d /usr.sbin/ntpd/ntp.c | |
parent | e2b3079a9a2517a38b09f5f5122129e1f694dc8e (diff) |
make ntpd imsg-in-a-lib ready as well. extensive testing done, no
behavior change.
ok eric@
Diffstat (limited to 'usr.sbin/ntpd/ntp.c')
-rw-r--r-- | usr.sbin/ntpd/ntp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/ntpd/ntp.c b/usr.sbin/ntpd/ntp.c index 4144bd7afa2..eb8034e3c79 100644 --- a/usr.sbin/ntpd/ntp.c +++ b/usr.sbin/ntpd/ntp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntp.c,v 1.111 2009/06/04 23:39:45 ckuethe Exp $ */ +/* $OpenBSD: ntp.c,v 1.112 2009/06/06 18:14:25 pyr Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -562,7 +562,7 @@ priv_adjfreq(double offset) else if (freq < -MAX_FREQUENCY_ADJUST) freq = -MAX_FREQUENCY_ADJUST; - imsg_compose(ibuf_main, IMSG_ADJFREQ, 0, 0, &freq, sizeof(freq)); + imsg_compose(ibuf_main, IMSG_ADJFREQ, 0, 0, -1, &freq, sizeof(freq)); conf->filters |= FILTER_ADJFREQ; conf->freq.xy = 0.0; conf->freq.x = 0.0; @@ -633,7 +633,7 @@ priv_adjtime(void) } conf->status.leap = offsets[i]->status.leap; - imsg_compose(ibuf_main, IMSG_ADJTIME, 0, 0, + imsg_compose(ibuf_main, IMSG_ADJTIME, 0, 0, -1, &offset_median, sizeof(offset_median)); priv_adjfreq(offset_median); @@ -680,7 +680,8 @@ offset_compare(const void *aa, const void *bb) void priv_settime(double offset) { - imsg_compose(ibuf_main, IMSG_SETTIME, 0, 0, &offset, sizeof(offset)); + imsg_compose(ibuf_main, IMSG_SETTIME, 0, 0, -1, + &offset, sizeof(offset)); conf->settime = 0; } @@ -690,7 +691,7 @@ priv_host_dns(char *name, u_int32_t peerid) u_int16_t dlen; dlen = strlen(name) + 1; - imsg_compose(ibuf_dns, IMSG_HOST_DNS, peerid, 0, name, dlen); + imsg_compose(ibuf_dns, IMSG_HOST_DNS, peerid, 0, -1, name, dlen); } void |