]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1660. [bug] win32: connection_reset_fix() was being called
authorMark Andrews <marka@isc.org>
Fri, 18 Jun 2004 01:16:04 +0000 (01:16 +0000)
committerMark Andrews <marka@isc.org>
Fri, 18 Jun 2004 01:16:04 +0000 (01:16 +0000)
                        unconditionally.  [RT #11595]

CHANGES
lib/isc/win32/socket.c

diff --git a/CHANGES b/CHANGES
index 6f1520fec8d91828a6c89e075ecc66a70c9864ad..3beb761a4e2848d6bb436f75454ada5cfef805f0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+1660.  [bug]           win32: connection_reset_fix() was being called
+                       unconditionally.  [RT #11595]
 
        --- 9.2.4rc5 released ---
 
index 773f6274db70707f5ee6a212c2b528d6e32ef89a..e6e4781a68deca294c536290f5b6ea327546330f 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: socket.c,v 1.5.2.21 2004/05/17 03:02:23 marka Exp $ */
+/* $Id: socket.c,v 1.5.2.22 2004/06/18 01:16:04 marka Exp $ */
 
 /* This code has been rewritten to take advantage of Windows Sockets
  * I/O Completion Ports and Events. I/O Completion Ports is ONLY
@@ -1846,11 +1846,13 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
        switch (type) {
        case isc_sockettype_udp:
                sock->fd = socket(pf, SOCK_DGRAM, IPPROTO_UDP);
-               result = connection_reset_fix(sock->fd);
-               if (result != ISC_R_SUCCESS) {
-                       closesocket(sock->fd);
-                       free_socket(&sock);
-                       return (result);
+               if (sock->fd != INVALID_SOCKET) {
+                       result = connection_reset_fix(sock->fd);
+                       if (result != ISC_R_SUCCESS) {
+                               closesocket(sock->fd);
+                               free_socket(&sock);
+                               return (result);
+                       }
                }
                break;
        case isc_sockettype_tcp: