Browse Source

ntp_adjtime() -> priv_adjtime()

ntp_settime() -> priv_settime()
ntp_host_dns() -> priv_host_dns()
OPENBSD_3_7
henning 20 years ago
parent
commit
b84ae4cbbe
3 changed files with 12 additions and 12 deletions
  1. +4
    -4
      src/usr.sbin/ntpd/client.c
  2. +4
    -4
      src/usr.sbin/ntpd/ntp.c
  3. +4
    -4
      src/usr.sbin/ntpd/ntpd.h

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

@ -1,4 +1,4 @@
/* $OpenBSD: client.c,v 1.44 2004/11/05 23:39:46 dtucker Exp $ */
/* $OpenBSD: client.c,v 1.45 2004/11/10 11:47:28 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -96,7 +96,7 @@ client_nextaddr(struct ntp_peer *p)
p->query->fd = -1;
if (p->addr_head.a == NULL) {
ntp_host_dns(p->addr_head.name, p->id);
priv_host_dns(p->addr_head.name, p->id);
return (-1);
}
@ -266,7 +266,7 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime)
client_update(p);
if (settime)
ntp_settime(p->reply[p->shift].offset);
priv_settime(p->reply[p->shift].offset);
log_debug("reply from %s: offset %f delay %f, "
"next query %ds", log_sockaddr((struct sockaddr *)&p->addr->ss),
@ -307,7 +307,7 @@ client_update(struct ntp_peer *p)
return (-1);
memcpy(&p->update, &p->reply[best], sizeof(p->update));
ntp_adjtime();
priv_adjtime();
for (i = 0; i < OFFSET_ARRAY_SIZE; i++)
if (p->reply[i].rcvd <= p->reply[best].rcvd)


+ 4
- 4
src/usr.sbin/ntpd/ntp.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: ntp.c,v 1.40 2004/10/27 14:19:12 dtucker Exp $ */
/* $OpenBSD: ntp.c,v 1.41 2004/11/10 11:47:28 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -353,7 +353,7 @@ peer_remove(struct ntp_peer *p)
}
void
ntp_adjtime(void)
priv_adjtime(void)
{
struct ntp_peer *p;
int offset_cnt = 0, i = 0;
@ -434,14 +434,14 @@ offset_compare(const void *aa, const void *bb)
}
void
ntp_settime(double offset)
priv_settime(double offset)
{
imsg_compose(ibuf_main, IMSG_SETTIME, 0, 0, &offset, sizeof(offset));
conf->settime = 0;
}
void
ntp_host_dns(char *name, u_int32_t peerid)
priv_host_dns(char *name, u_int32_t peerid)
{
u_int16_t dlen;


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

@ -1,4 +1,4 @@
/* $OpenBSD: ntpd.h,v 1.42 2004/11/10 11:27:54 henning Exp $ */
/* $OpenBSD: ntpd.h,v 1.43 2004/11/10 11:47:28 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -205,9 +205,9 @@ void imsg_free(struct imsg *);
/* ntp.c */
pid_t ntp_main(int[2], struct ntpd_conf *);
void ntp_adjtime(void);
void ntp_settime(double);
void ntp_host_dns(char *, u_int32_t);
void priv_adjtime(void);
void priv_settime(double);
void priv_host_dns(char *, u_int32_t);
/* parse.y */
int parse_config(const char *, struct ntpd_conf *);


Loading…
Cancel
Save