]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1882. [port] win32: isc__errno2result() now reports its caller.
authorMark Andrews <marka@isc.org>
Wed, 8 Jun 2005 01:04:30 +0000 (01:04 +0000)
committerMark Andrews <marka@isc.org>
Wed, 8 Jun 2005 01:04:30 +0000 (01:04 +0000)
                        [RT #13753]

1881.   [port]          win32: Handle ERROR_NETNAME_DELETED.  [RT #13753]

CHANGES
lib/isc/win32/errno2result.c
lib/isc/win32/errno2result.h
lib/isc/win32/socket.c

diff --git a/CHANGES b/CHANGES
index b99118b3b1c49cbdc07ab8304632d1bec218bce0..ed8b5f8461447fc77db897ef8654a73cfa8268c2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+1882.  [port]          win32: isc__errno2result() now reports its caller.
+                       [RT #13753]
+
+1881.  [port]          win32: Handle ERROR_NETNAME_DELETED.  [RT #13753]
+
 1880.  [placeholder]
 
 1879.  [func]          Added framework for handling multiple EDNS versions.
index f7873f51ab07ee3a683cdd9f0322190f8e2cc7aa..8c8c6038e94b06fc4dad507fd35a978e4f72d877 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: errno2result.c,v 1.9 2004/03/05 05:11:56 marka Exp $ */
+/* $Id: errno2result.c,v 1.10 2005/06/08 01:04:29 marka Exp $ */
 
 #include <config.h>
 
@@ -32,7 +32,7 @@
  * not already there.
  */
 isc_result_t
-isc__errno2result(int posixerrno) {
+isc__errno2resultx(int posixerrno, const char *file, int line) {
        char strbuf[ISC_STRERRORSIZE];
 
        switch (posixerrno) {
@@ -63,10 +63,8 @@ isc__errno2result(int posixerrno) {
                return (ISC_R_TOOMANYOPENFILES);
        default:
                isc__strerror(posixerrno, strbuf, sizeof(strbuf));
-               UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "unable to convert errno "
-                                "to isc_result: %d: %s",
-                                posixerrno, strbuf);
+               UNEXPECTED_ERROR(file, line, "unable to convert errno "
+                                "to isc_result: %d: %s", posixerrno, strbuf);
                /*
                 * XXXDCL would be nice if perhaps this function could
                 * return the system's error string, so the caller
@@ -76,4 +74,3 @@ isc__errno2result(int posixerrno) {
                return (ISC_R_UNEXPECTED);
        }
 }
-
index b72dc33cace38dde14034e2558ec4b5baf113ee7..75d60b0c96ce7c743434a5f2ee918bda606a0e45 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: errno2result.h,v 1.6 2004/03/05 05:11:57 marka Exp $ */
+/* $Id: errno2result.h,v 1.7 2005/06/08 01:04:29 marka Exp $ */
 
 #ifndef UNIX_ERRNO2RESULT_H
 #define UNIX_ERRNO2RESULT_H 1
 
 ISC_LANG_BEGINDECLS
 
+#define isc__errno2result(posixerrno) \
+       isc__errno2resultx(posixerrno, __FILE__, __LINE__)
+
 isc_result_t
-isc__errno2result(int posixerrno);
+isc__errno2resultx(int posixerrno, const char *file, int line);
 
 ISC_LANG_ENDDECLS
 
index b7855b7746fc17d1d239108ea87758aaa0f2af1b..65766cca6fe90fb6cebe993a51e43ad2d88fe6c6 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: socket.c,v 1.37 2005/02/24 00:33:35 marka Exp $ */
+/* $Id: socket.c,v 1.38 2005/06/08 01:04:30 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
@@ -1385,6 +1385,7 @@ completeio_recv(isc_socket_t *sock, isc_socketevent_t *dev,
                SOFT_OR_HARD(WSAEDISCON, ISC_R_CONNECTIONRESET);
                SOFT_OR_HARD(WSAENETDOWN, ISC_R_NETDOWN);
                ALWAYS_HARD(ERROR_OPERATION_ABORTED, ISC_R_CONNECTIONRESET);
+               ALWAYS_HARD(ERROR_NETNAME_DELETED, ISC_R_CONNECTIONRESET);
                ALWAYS_HARD(ERROR_PORT_UNREACHABLE, ISC_R_HOSTUNREACH);
                ALWAYS_HARD(ERROR_HOST_UNREACHABLE, ISC_R_HOSTUNREACH);
                ALWAYS_HARD(ERROR_NETWORK_UNREACHABLE, ISC_R_NETUNREACH);
@@ -1572,6 +1573,7 @@ completeio_send(isc_socket_t *sock, isc_socketevent_t *dev,
                SOFT_OR_HARD(WSAEDISCON, ISC_R_CONNECTIONRESET);
                SOFT_OR_HARD(WSAENETDOWN, ISC_R_NETDOWN);
                ALWAYS_HARD(ERROR_OPERATION_ABORTED, ISC_R_CONNECTIONRESET);
+               ALWAYS_HARD(ERROR_NETNAME_DELETED, ISC_R_CONNECTIONRESET);
                ALWAYS_HARD(ERROR_PORT_UNREACHABLE, ISC_R_HOSTUNREACH);
                ALWAYS_HARD(ERROR_HOST_UNREACHABLE, ISC_R_HOSTUNREACH);
                ALWAYS_HARD(ERROR_NETWORK_UNREACHABLE, ISC_R_NETUNREACH);