2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-01 15:05:23 +00:00

complete change of NETMGR_TRACE to ISC_NETMGR_TRACE

some references to the old ifdef were still in place.
This commit is contained in:
Evan Hunt
2023-01-17 13:58:10 -08:00
parent 46c0b349ed
commit 301f8b23e1
6 changed files with 15 additions and 10 deletions

View File

@@ -148,15 +148,20 @@ isc_nmsocket_set_max_streams(isc_nmsocket_t *listener,
* \li 'listener' is a pointer to a valid network manager listener socket. * \li 'listener' is a pointer to a valid network manager listener socket.
*/ */
#ifdef ISC_NETMGR_TRACE #if ISC_NETMGR_TRACE
#define isc_nmhandle_attach(handle, dest) \ #define isc_nmhandle_attach(handle, dest) \
isc__nmhandle_attach(handle, dest, __FILE__, __LINE__, __func__) isc__nmhandle_attach(handle, dest, __FILE__, __LINE__, __func__)
#define isc_nmhandle_detach(handlep) \ #define isc_nmhandle_detach(handlep) \
isc__nmhandle_detach(handlep, __FILE__, __LINE__, __func__) isc__nmhandle_detach(handlep, __FILE__, __LINE__, __func__)
#define FLARG , const char *file, unsigned int line, const char *func #define FLARG_PASS , file, line, func
#define FLARG \
, const char *file __attribute__((unused)), \
unsigned int line __attribute__((unused)), \
const char *func __attribute__((unused))
#else #else
#define isc_nmhandle_attach(handle, dest) isc__nmhandle_attach(handle, dest) #define isc_nmhandle_attach(handle, dest) isc__nmhandle_attach(handle, dest)
#define isc_nmhandle_detach(handlep) isc__nmhandle_detach(handlep) #define isc_nmhandle_detach(handlep) isc__nmhandle_detach(handlep)
#define FLARG_PASS
#define FLARG #define FLARG
#endif #endif

View File

@@ -129,11 +129,11 @@ STATIC_ASSERT(ISC_NETMGR_TCP_RECVBUF_SIZE <= ISC_NETMGR_RECVBUF_SIZE,
fprintf(stderr, "%" PRIu32 ":%d:%s:%u:%s:" format, gettid(), \ fprintf(stderr, "%" PRIu32 ":%d:%s:%u:%s:" format, gettid(), \
isc_tid(), file, line, func, __VA_ARGS__) isc_tid(), file, line, func, __VA_ARGS__)
#define FLARG_PASS , file, line, func
#define FLARG \ #define FLARG \
, const char *file __attribute__((unused)), \ , const char *file __attribute__((unused)), \
unsigned int line __attribute__((unused)), \ unsigned int line __attribute__((unused)), \
const char *func __attribute__((unused)) const char *func __attribute__((unused))
#define FLARG_PASS , file, line, func
#define FLARG_IEVENT(ievent) \ #define FLARG_IEVENT(ievent) \
const char *file = ievent->file; \ const char *file = ievent->file; \
unsigned int line = ievent->line; \ unsigned int line = ievent->line; \
@@ -164,8 +164,8 @@ STATIC_ASSERT(ISC_NETMGR_TCP_RECVBUF_SIZE <= ISC_NETMGR_RECVBUF_SIZE,
#else #else
#define NETMGR_TRACE_LOG(format, ...) #define NETMGR_TRACE_LOG(format, ...)
#define FLARG_PASS
#define FLARG #define FLARG
#define FLARG_PASS
#define FLARG_IEVENT(ievent) #define FLARG_IEVENT(ievent)
#define FLARG_IEVENT_PASS(ievent) #define FLARG_IEVENT_PASS(ievent)
#define isc__nm_uvreq_get(req, sock) isc___nm_uvreq_get(req, sock) #define isc__nm_uvreq_get(req, sock) isc___nm_uvreq_get(req, sock)

View File

@@ -632,11 +632,11 @@ nmsocket_cleanup(isc_nmsocket_t *sock) {
sock->statichandle = NULL; sock->statichandle = NULL;
if (sock->outerhandle != NULL) { if (sock->outerhandle != NULL) {
isc__nmhandle_detach(&sock->outerhandle FLARG_PASS); isc_nmhandle_detach(&sock->outerhandle);
} }
if (sock->outer != NULL) { if (sock->outer != NULL) {
isc___nmsocket_detach(&sock->outer FLARG_PASS); isc__nmsocket_detach(&sock->outer);
} }
while ((handle = ISC_LIST_HEAD(sock->inactive_handles)) != NULL) { while ((handle = ISC_LIST_HEAD(sock->inactive_handles)) != NULL) {

View File

@@ -509,7 +509,7 @@ tls_do_bio(isc_nmsocket_t *sock, isc_region_t *received_data,
received_data->length, &len); received_data->length, &len);
if (rv <= 0 || len != received_data->length) { if (rv <= 0 || len != received_data->length) {
result = ISC_R_TLSERROR; result = ISC_R_TLSERROR;
#if defined(NETMGR_TRACE) && defined(NETMGR_TRACE_VERBOSE) #if ISC_NETMGR_TRACE
saved_errno = errno; saved_errno = errno;
#endif #endif
goto error; goto error;
@@ -744,7 +744,7 @@ tls_do_bio(isc_nmsocket_t *sock, isc_region_t *received_data,
} }
error: error:
#if defined(NETMGR_TRACE) && defined(NETMGR_TRACE_VERBOSE) #if ISC_NETMGR_TRACE
isc__nmsocket_log(sock, ISC_LOG_NOTICE, isc__nmsocket_log(sock, ISC_LOG_NOTICE,
"SSL error in BIO: %d %s (errno: %d). Arguments: " "SSL error in BIO: %d %s (errno: %d). Arguments: "
"received_data: %p, " "received_data: %p, "

View File

@@ -54,7 +54,7 @@ extern ns_server_t *sctx;
extern atomic_uint_fast32_t client_refs[32]; extern atomic_uint_fast32_t client_refs[32];
extern atomic_uintptr_t client_addrs[32]; extern atomic_uintptr_t client_addrs[32];
#ifdef NETMGR_TRACE #if ISC_NETMGR_TRACE
#define FLARG \ #define FLARG \
, const char *file __attribute__((unused)), \ , const char *file __attribute__((unused)), \
unsigned int line __attribute__((unused)), \ unsigned int line __attribute__((unused)), \

View File

@@ -21,7 +21,7 @@
#include <ns/client.h> #include <ns/client.h>
#ifdef NETMGR_TRACE #if ISC_NETMGR_TRACE
#define FLARG \ #define FLARG \
, const char *file __attribute__((unused)), \ , const char *file __attribute__((unused)), \
unsigned int line __attribute__((unused)), \ unsigned int line __attribute__((unused)), \