Commit 77cb7130 authored by Mark Andrews's avatar Mark Andrews
Browse files

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]
parent dfddd6bd
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]
......
......@@ -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");
......
......@@ -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 <config.h>
#include <stdarg.h>
......@@ -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");
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment