summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2003-11-19 20:14:58 +0000
committermillert <millert@openbsd.org>2003-11-19 20:14:58 +0000
commit02b03ff433779c1c650c34c29d9e1d43e973c35a (patch)
treecd8139bd70055c1714f7131ba1a98357305128cb
parentfix some select/poll conversion breakage, more to come from millert@. (diff)
downloadwireguard-openbsd-02b03ff433779c1c650c34c29d9e1d43e973c35a.tar.xz
wireguard-openbsd-02b03ff433779c1c650c34c29d9e1d43e973c35a.zip
More poll conversion fixes.
-rw-r--r--usr.sbin/timed/timed/measure.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/timed/timed/measure.c b/usr.sbin/timed/timed/measure.c
index 968a5956863..b11194a9164 100644
--- a/usr.sbin/timed/timed/measure.c
+++ b/usr.sbin/timed/timed/measure.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: measure.c,v 1.12 2003/08/19 19:41:21 deraadt Exp $ */
+/* $OpenBSD: measure.c,v 1.13 2003/11/19 20:14:58 millert Exp $ */
/*-
* Copyright (c) 1985, 1993 The Regents of the University of California.
@@ -98,8 +98,7 @@ measure(u_long maxmsec, u_long wmsec, char *hname, struct sockaddr_in *addr,
pfd[0].fd = sock_raw;
pfd[0].events = POLLIN;
for (;;) {
- tout.tv_sec = tout.tv_usec = 0;
- if (poll(pfd, 1, tout.tv_sec * 1000)) {
+ if (poll(pfd, 1, 0)) {
length = sizeof(struct sockaddr_in);
siginterrupt(SIGINT, 1);
cc = recvfrom(sock_raw, (char *)packet, PACKET_IN, 0,
@@ -176,7 +175,8 @@ measure(u_long maxmsec, u_long wmsec, char *hname, struct sockaddr_in *addr,
if (tout.tv_sec < 0)
tout.tv_sec = 0;
- count = poll(pfd, 1, tout.tv_sec * 1000);
+ count = poll(pfd, 1,
+ tout.tv_sec * 1000 + tout.tv_usec / 1000);
(void)gettimeofday(&tcur, (struct timezone *)0);
if (count <= 0)
break;