]> 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:14:59 +0000 (01:14 +0000)
committerMark Andrews <marka@isc.org>
Fri, 18 Jun 2004 01:14:59 +0000 (01:14 +0000)
                        unconditionally.  [RT #11595]

CHANGES
lib/isc/win32/socket.c

diff --git a/CHANGES b/CHANGES
index 6eee8048bf5dff010279013f2abbd06ceff6f6ab..8b803e7effed270d8a69a63cc6782b50956e99b6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -11,7 +11,8 @@
 
 1661.  [placeholder]   rt11582
 
-1660   [placeholder]   rt11595
+1660.  [bug]           win32: connection_reset_fix() was being called
+                       unconditionally.  [RT #11595]
 
 1659.  [cleanup]       Cleanup some messages that were referring to KEY vs
                        DNSKEY, NXT vs NSEC and SIG vs RRSIG.
index f37e7b5d412940e0e2d46f080402249203051e34..5d2e8d976dde43d51c2fdd50ce22516ca1e2cf6d 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: socket.c,v 1.32 2004/05/17 03:15:59 marka Exp $ */
+/* $Id: socket.c,v 1.33 2004/06/18 01:14:59 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: