diff --git a/CHANGES b/CHANGES index c81e4378fc..421c29f1ad 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +3276. [bug] win32: isc_socket_dup is not implemented. [RT #27696] + +3276. [bug] win32: ns_os_openfile failed to return NULL on + safe_open failure. [RT #27696] + 3275. [bug] Corrected rndc -h output; the 'rndc sync -clean' option had been missplled as '-clear'. (To avoid future confusion, both options now work.) [RT #27173] diff --git a/bin/named/main.c b/bin/named/main.c index cdd16bb7d0..51c3a0ef7a 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: main.c,v 1.185 2011/11/09 18:44:03 each Exp $ */ +/* $Id: main.c,v 1.186 2012/02/06 04:19:33 marka Exp $ */ /*! \file */ @@ -590,8 +590,12 @@ create_managers(void) { #else ns_g_cpus = 1; #endif +#ifdef WIN32 + ns_g_udpdisp = 1; +#else if (ns_g_udpdisp == 0 || ns_g_udpdisp > ns_g_cpus) ns_g_udpdisp = ns_g_cpus; +#endif isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER, ISC_LOG_INFO, "using %u UDP listener%s per interface", ns_g_udpdisp, ns_g_udpdisp == 1 ? "" : "s"); diff --git a/bin/named/win32/os.c b/bin/named/win32/os.c index 39151ed147..ee0f7a597c 100644 --- a/bin/named/win32/os.c +++ b/bin/named/win32/os.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: os.c,v 1.37 2009/08/05 18:43:37 each Exp $ */ +/* $Id: os.c,v 1.38 2012/02/06 04:19:33 marka Exp $ */ #include #include @@ -218,6 +218,7 @@ ns_os_openfile(const char *filename, int mode, isc_boolean_t switch_user) { isc__strerror(errno, strbuf, sizeof(strbuf)); ns_main_earlywarning("could not open file '%s': %s", filename, strbuf); + return (NULL); } fp = fdopen(fd, "w"); diff --git a/lib/isc/win32/socket.c b/lib/isc/win32/socket.c index 8bb5b3273b..889938389f 100644 --- a/lib/isc/win32/socket.c +++ b/lib/isc/win32/socket.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.93 2011/11/29 01:03:47 marka Exp $ */ +/* $Id: socket.c,v 1.94 2012/02/06 04:19:33 marka Exp $ */ /* This code uses functions which are only available on Server 2003 and * higher, and Windows XP and higher. @@ -1649,12 +1649,17 @@ socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type, REQUIRE(socketp != NULL && *socketp == NULL); REQUIRE(type != isc_sockettype_fdwatch); + if (dup_socket != NULL) + return (ISC_R_NOTIMPLEMENTED); + result = allocate_socket(manager, type, &sock); if (result != ISC_R_SUCCESS) return (result); sock->pf = pf; +#if 0 if (dup_socket == NULL) { +#endif switch (type) { case isc_sockettype_udp: sock->fd = socket(pf, SOCK_DGRAM, IPPROTO_UDP); @@ -1680,6 +1685,7 @@ socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type, sock->fd = socket(pf, SOCK_STREAM, IPPROTO_TCP); break; } +#if 0 } else { /* * XXX: dup() is deprecated in windows, use _dup() @@ -1690,6 +1696,7 @@ socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type, sock->dupped = 1; sock->bound = dup_socket->bound; } +#endif if (sock->fd == INVALID_SOCKET) { socket_errno = WSAGetLastError(); @@ -1826,8 +1833,12 @@ isc__socket_dup(isc_socket_t *sock, isc_socket_t **socketp) { REQUIRE(VALID_SOCKET(sock)); REQUIRE(socketp != NULL && *socketp == NULL); +#if 1 + return (ISC_R_NOTIMPLEMENTED); +#else return (socket_create(sock->manager, sock->pf, sock->type, socketp, sock)); +#endif } isc_result_t