From: Harlan Stenn Date: Thu, 19 Dec 2002 18:20:53 +0000 (-0500) Subject: Fixes from John Hay. X-Git-Tag: NTP_4_1_73~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66bf8bc680ec85931a2efe7a72189ccddf0f237a;p=thirdparty%2Fntp.git Fixes from John Hay. bk: 3e020e05bhv0dSAog25SoKwfBuQC_w --- diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c index 6ae775db6d..05351cd11b 100644 --- a/ntpd/ntp_io.c +++ b/ntpd/ntp_io.c @@ -558,7 +558,7 @@ create_sockets( inter_list[i].flags = 0; af = lifr->lifr_addr.zz_family; - close_socket(vs); + closesocket(vs); vs = socket(af, SOCK_DGRAM, 0); # ifndef SYS_WINNT @@ -734,7 +734,7 @@ create_sockets( if (i > MAXINTERFACES) break; } - close_socket(vs); + closesocket(vs); #endif /* _BSDI_VERSION >= 199510 */ ninterfaces = i; @@ -1418,7 +1418,7 @@ close_socket( (void) closesocket(fd); FD_CLR( (u_int) fd, &activefds); - if (fd >= maxactivefd) { + if (fd == maxactivefd) { newmax = 0; for (i = 0; i < maxactivefd; i++) if (FD_ISSET(i, &activefds)) @@ -1442,7 +1442,7 @@ close_file( (void) close(fd); FD_CLR( (u_int) fd, &activefds); - if (fd >= maxactivefd) { + if (fd == maxactivefd) { newmax = 0; for (i = 0; i < maxactivefd; i++) if (FD_ISSET(i, &activefds)) @@ -1526,7 +1526,7 @@ sendpkt( * set the multicast ttl for outgoing packets */ if (setsockopt(inter->fd, IPPROTO_IP, IP_MULTICAST_TTL, - (char *) &ttl, sizeof(ttl)) != 0) { + &mttl, sizeof(mttl)) != 0) { msyslog(LOG_ERR, "setsockopt IP_MULTICAST_TTL fails: %m"); } else