]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1443] Remove unnecessary dependencies on ntp_io.h
authorDanny Mayer <mayer@ntp.org>
Sun, 27 Dec 2009 21:02:00 +0000 (21:02 +0000)
committerDanny Mayer <mayer@ntp.org>
Sun, 27 Dec 2009 21:02:00 +0000 (21:02 +0000)
bk: 4b37cb48BIxdonv_3qVGhU0PAixOlA

libntp/recvbuff.c
ntpd/ntp_io.c
ntpd/ntp_util.c
ntpdate/ntpdate.c
ntpdc/ntpdc.c
ntpq/ntpq.c

index 9a7d6caf4333e729243ea764a62f286b013e2b3f..39600211bb2f3569fe8fd8ebef72b84ba70efcc9 100644 (file)
@@ -8,7 +8,6 @@
 #include "ntp_fp.h"
 #include "ntp_syslog.h"
 #include "ntp_stdlib.h"
-#include "ntp_io.h"
 #include "ntp_lists.h"
 #include "recvbuff.h"
 #include "iosignal.h"
index 50d1da3fda5094cf081d09dbf8e7895e487963b5..f15783951c685e1e102d5e390e1e78e90421e213 100644 (file)
@@ -100,6 +100,7 @@ nic_rule *nic_rule_list;
 #endif
 
 #if defined(SYS_WINNT)
+#include "win32_io.h"
 #include <isc/win32os.h>
 /*
  * Windows C runtime ioctl() can't deal properly with sockets, 
@@ -300,43 +301,6 @@ static inline int     read_refclock_packet (SOCKET, struct refclockio *, l_fp);
 #endif
 
 
-#ifdef SYS_WINNT
-/*
- * Windows 2000 systems incorrectly cause UDP sockets using WASRecvFrom
- * to not work correctly, returning a WSACONNRESET error when a WSASendTo
- * fails with an "ICMP port unreachable" response and preventing the
- * socket from using the WSARecvFrom in subsequent operations.
- * The function below fixes this, but requires that Windows 2000
- * Service Pack 2 or later be installed on the system.  NT 4.0
- * systems are not affected by this and work correctly.
- * See Microsoft Knowledge Base Article Q263823 for details of this.
- */
-void
-connection_reset_fix(
-       SOCKET          fd,
-       sockaddr_u *    addr
-       )
-{
-       DWORD dw;
-       BOOL  bNewBehavior = FALSE;
-       DWORD status;
-
-       /*
-        * disable bad behavior using IOCTL: SIO_UDP_CONNRESET
-        * NT 4.0 has no problem
-        */
-       if (isc_win32os_majorversion() >= 5) {
-               status = WSAIoctl(fd, SIO_UDP_CONNRESET, &bNewBehavior,
-                                 sizeof(bNewBehavior), NULL, 0,
-                                 &dw, NULL, NULL);
-               if (SOCKET_ERROR == status)
-                       msyslog(LOG_ERR,
-                               "connection_reset_fix() failed for address %s: %m", 
-                               stoa(addr));
-       }
-}
-#endif
-
 /*
  * on Unix systems the stdio library typically
  * makes use of file descriptors in the lower
index bf3725c0170b4597d3545f1945a731ae2d460e30..2e56af119426b634cf7f435aa2cac005e261a513 100644 (file)
@@ -6,7 +6,6 @@
 #endif
 
 #include "ntpd.h"
-#include "ntp_io.h"
 #include "ntp_unixtime.h"
 #include "ntp_filegen.h"
 #include "ntp_if.h"
index 16b8e7fe0c0e0453dfd87013ee2eebfc45a2d2cc..205d7e5faab891dffa84639a4a0f32efac769067 100644 (file)
@@ -13,7 +13,6 @@
 #include "ntp_machine.h"
 #include "ntp_fp.h"
 #include "ntp.h"
-#include "ntp_io.h"
 #include "ntp_unixtime.h"
 #include "ntpdate.h"
 #include "ntp_string.h"
index 4bfb25ff2dfe6852a5973f7d540f81e985009e6d..53a3b050c35ef5bdd5932678136dd09bc32be882 100644 (file)
@@ -10,7 +10,6 @@
 
 #include "ntpdc.h"
 #include "ntp_select.h"
-#include "ntp_io.h"
 #include "ntp_stdlib.h"
 #include "ntp_assert.h"
 #include "ntp_lineedit.h"
index d1ebc414ea058fc919936f69644a8bfdc585bb98..03a3af7f181f59a91919e59bda8b9e37ea19f02c 100644 (file)
@@ -13,7 +13,6 @@
 #include "ntpq.h"
 #include "ntp_unixtime.h"
 #include "ntp_calendar.h"
-#include "ntp_io.h"
 #include "ntp_select.h"
 #include "ntp_stdlib.h"
 #include "ntp_assert.h"