Browse Source

delay, not error

OPENBSD_3_6
henning 20 years ago
parent
commit
25baf3f656
2 changed files with 5 additions and 5 deletions
  1. +3
    -3
      src/usr.sbin/ntpd/client.c
  2. +2
    -2
      src/usr.sbin/ntpd/ntpd.h

+ 3
- 3
src/usr.sbin/ntpd/client.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: client.c,v 1.5 2004/07/04 22:24:20 henning Exp $ */
/* $OpenBSD: client.c,v 1.6 2004/07/05 20:41:34 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -136,13 +136,13 @@ client_dispatch(struct ntp_peer *p)
T3 = lfp_to_d(msg.xmttime);
p->offset = ((T2 - T1) + (T3 - T4)) / 2;
p->error = (T2 - T1) - (T3 - T4);
p->delay = (T2 - T1) - (T3 - T4);
p->state = STATE_REPLY_RECEIVED;
p->next = time(NULL) + INTERVAL_QUERY;
p->deadline = 0;
log_debug("reply received: offset %f error %f", p->offset, p->error);
log_debug("reply received: offset %f delay %f", p->offset, p->delay);
return (0);
}

+ 2
- 2
src/usr.sbin/ntpd/ntpd.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: ntpd.h,v 1.10 2004/07/05 07:46:16 henning Exp $ */
/* $OpenBSD: ntpd.h,v 1.11 2004/07/05 20:41:35 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -60,7 +60,7 @@ struct ntp_peer {
time_t next;
time_t deadline;
double offset;
double error;
double delay;
};
struct ntpd_conf {


Loading…
Cancel
Save