2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

always enable ISC_xxx_NAMES

This commit is contained in:
Tatuya JINMEI 神明達哉
2008-03-27 21:08:52 +00:00
parent 7e26a2a646
commit d8eb00152d
3 changed files with 3 additions and 43 deletions

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket.c,v 1.279 2008/01/27 01:58:19 marka Exp $ */
/* $Id: socket.c,v 1.280 2008/03/27 21:08:51 jinmei Exp $ */
/*! \file */
@@ -65,12 +65,6 @@
#include "socket_p.h"
#endif /* ISC_PLATFORM_USETHREADS */
/*
* Support names for sockets.
*/
#define ISC_SOCKET_NAMES 1
#if defined(SO_BSDCOMPAT) && defined(__linux__)
#include <sys/utsname.h>
#endif
@@ -166,11 +160,8 @@ struct isc_socket {
unsigned int references;
int fd;
int pf;
#ifdef ISC_SOCKET_NAMES
char name[16];
void * tag;
#endif
ISC_LIST(isc_socketevent_t) send_list;
ISC_LIST(isc_socketevent_t) recv_list;
@@ -1696,10 +1687,8 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
}
#endif /* defined(USE_CMSG) || defined(SO_RCVBUF) */
#ifdef ISC_SOCKET_NAMES
memset(sock->name, 0, sizeof(sock->name));
sock->tag = NULL;
#endif
sock->references = 1;
*socketp = sock;
@@ -4048,17 +4037,11 @@ isc_socket_setname(isc_socket_t *socket, const char *name, void *tag) {
REQUIRE(VALID_SOCKET(socket));
#ifdef ISC_SOCKET_NAMES
LOCK(&socket->lock);
memset(socket->name, 0, sizeof(socket->name));
strncpy(socket->name, name, sizeof(socket->name) - 1);
socket->tag = tag;
UNLOCK(&socket->lock);
#else
UNUSED(name);
UNUSED(tag);
#endif
}
const char *