]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Fixes from John Hay.
authorHarlan Stenn <stenn@ntp.org>
Thu, 19 Dec 2002 18:20:53 +0000 (13:20 -0500)
committerHarlan Stenn <stenn@ntp.org>
Thu, 19 Dec 2002 18:20:53 +0000 (13:20 -0500)
bk: 3e020e05bhv0dSAog25SoKwfBuQC_w

ntpd/ntp_io.c

index 6ae775db6d7f6746631e82c7b983de03f9110abf..05351cd11b1697d12d54826390238ae3f268c60a 100644 (file)
@@ -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