mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 16:15:27 +00:00
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]
This commit is contained in:
5
CHANGES
5
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'
|
3275. [bug] Corrected rndc -h output; the 'rndc sync -clean'
|
||||||
option had been missplled as '-clear'. (To avoid
|
option had been missplled as '-clear'. (To avoid
|
||||||
future confusion, both options now work.) [RT #27173]
|
future confusion, both options now work.) [RT #27173]
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* 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 */
|
/*! \file */
|
||||||
|
|
||||||
@@ -590,8 +590,12 @@ create_managers(void) {
|
|||||||
#else
|
#else
|
||||||
ns_g_cpus = 1;
|
ns_g_cpus = 1;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef WIN32
|
||||||
|
ns_g_udpdisp = 1;
|
||||||
|
#else
|
||||||
if (ns_g_udpdisp == 0 || ns_g_udpdisp > ns_g_cpus)
|
if (ns_g_udpdisp == 0 || ns_g_udpdisp > ns_g_cpus)
|
||||||
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_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER,
|
||||||
ISC_LOG_INFO, "using %u UDP listener%s per interface",
|
ISC_LOG_INFO, "using %u UDP listener%s per interface",
|
||||||
ns_g_udpdisp, ns_g_udpdisp == 1 ? "" : "s");
|
ns_g_udpdisp, ns_g_udpdisp == 1 ? "" : "s");
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* 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 <config.h>
|
||||||
#include <stdarg.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));
|
isc__strerror(errno, strbuf, sizeof(strbuf));
|
||||||
ns_main_earlywarning("could not open file '%s': %s",
|
ns_main_earlywarning("could not open file '%s': %s",
|
||||||
filename, strbuf);
|
filename, strbuf);
|
||||||
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
fp = fdopen(fd, "w");
|
fp = fdopen(fd, "w");
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* 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
|
/* This code uses functions which are only available on Server 2003 and
|
||||||
* higher, and Windows XP and higher.
|
* 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(socketp != NULL && *socketp == NULL);
|
||||||
REQUIRE(type != isc_sockettype_fdwatch);
|
REQUIRE(type != isc_sockettype_fdwatch);
|
||||||
|
|
||||||
|
if (dup_socket != NULL)
|
||||||
|
return (ISC_R_NOTIMPLEMENTED);
|
||||||
|
|
||||||
result = allocate_socket(manager, type, &sock);
|
result = allocate_socket(manager, type, &sock);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
return (result);
|
return (result);
|
||||||
|
|
||||||
sock->pf = pf;
|
sock->pf = pf;
|
||||||
|
#if 0
|
||||||
if (dup_socket == NULL) {
|
if (dup_socket == NULL) {
|
||||||
|
#endif
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case isc_sockettype_udp:
|
case isc_sockettype_udp:
|
||||||
sock->fd = socket(pf, SOCK_DGRAM, IPPROTO_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);
|
sock->fd = socket(pf, SOCK_STREAM, IPPROTO_TCP);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* XXX: dup() is deprecated in windows, use _dup()
|
* 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->dupped = 1;
|
||||||
sock->bound = dup_socket->bound;
|
sock->bound = dup_socket->bound;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (sock->fd == INVALID_SOCKET) {
|
if (sock->fd == INVALID_SOCKET) {
|
||||||
socket_errno = WSAGetLastError();
|
socket_errno = WSAGetLastError();
|
||||||
@@ -1826,8 +1833,12 @@ isc__socket_dup(isc_socket_t *sock, isc_socket_t **socketp) {
|
|||||||
REQUIRE(VALID_SOCKET(sock));
|
REQUIRE(VALID_SOCKET(sock));
|
||||||
REQUIRE(socketp != NULL && *socketp == NULL);
|
REQUIRE(socketp != NULL && *socketp == NULL);
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
return (ISC_R_NOTIMPLEMENTED);
|
||||||
|
#else
|
||||||
return (socket_create(sock->manager, sock->pf, sock->type,
|
return (socket_create(sock->manager, sock->pf, sock->type,
|
||||||
socketp, sock));
|
socketp, sock));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
|
Reference in New Issue
Block a user