aboutsummaryrefslogtreecommitdiff
path: root/external/unbound/dnstap/dnstap.c
diff options
context:
space:
mode:
Diffstat (limited to 'external/unbound/dnstap/dnstap.c')
-rw-r--r--external/unbound/dnstap/dnstap.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/external/unbound/dnstap/dnstap.c b/external/unbound/dnstap/dnstap.c
index b62dc5b8c..5d0420f6f 100644
--- a/external/unbound/dnstap/dnstap.c
+++ b/external/unbound/dnstap/dnstap.c
@@ -121,14 +121,17 @@ dt_msg_init(const struct dt_env *env,
struct dt_env *
dt_create(const char *socket_path, unsigned num_workers)
{
+#ifdef UNBOUND_DEBUG
fstrm_res res;
+#endif
struct dt_env *env;
struct fstrm_iothr_options *fopt;
struct fstrm_unix_writer_options *fuwopt;
struct fstrm_writer *fw;
struct fstrm_writer_options *fwopt;
- verbose(VERB_OPS, "opening dnstap socket %s", socket_path);
+ verbose(VERB_OPS, "attempting to connect to dnstap socket %s",
+ socket_path);
log_assert(socket_path != NULL);
log_assert(num_workers > 0);
@@ -137,7 +140,12 @@ dt_create(const char *socket_path, unsigned num_workers)
return NULL;
fwopt = fstrm_writer_options_init();
- res = fstrm_writer_options_add_content_type(fwopt,
+#ifdef UNBOUND_DEBUG
+ res =
+#else
+ (void)
+#endif
+ fstrm_writer_options_add_content_type(fwopt,
DNSTAP_CONTENT_TYPE, sizeof(DNSTAP_CONTENT_TYPE) - 1);
log_assert(res == fstrm_res_success);
@@ -474,7 +482,7 @@ dt_msg_send_outside_response(struct dt_env *env,
return;
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__FORWARDER_RESPONSE);
} else {
- if (!env->log_resolver_query_messages)
+ if (!env->log_resolver_response_messages)
return;
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__RESOLVER_RESPONSE);
}