]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fixup for dnstap.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 18 Aug 2014 14:42:26 +0000 (14:42 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 18 Aug 2014 14:42:26 +0000 (14:42 +0000)
git-svn-id: file:///svn/unbound/trunk@3209 be551aaa-1e26-0410-a405-d3ace91eadb9

Makefile.in
daemon/daemon.c
dnstap/dnstap.c
dnstap/dnstap_config.h [deleted file]
testdata/01-doc.tpkg

index dec1a1d9aa2a987f9802dbf7aa781ecd156b007a..7300b3e3476857fcd5a3e493bb655e527b54f322 100644 (file)
@@ -72,7 +72,7 @@ LINT=splint
 LINTFLAGS=+quiet -weak -warnposix -unrecog -Din_addr_t=uint32_t -Du_int=unsigned -Du_char=uint8_t -preproc -Drlimit=rlimit64 -D__gnuc_va_list=va_list -formatcode
 #-Dglob64=glob -Dglobfree64=globfree
 # compat with openssl linux edition.
-LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray -D"ENGINE=unsigned" -D"RSA=unsigned" -D"DSA=unsigned" -D"EVP_PKEY=unsigned" -D"EVP_MD=unsigned" -D"SSL=unsigned" -D"SSL_CTX=unsigned" -D"X509=unsigned" -D"RC4_KEY=unsigned" -D"EVP_MD_CTX=unsigned" -D"ECDSA_SIG=DSA_SIG"
+LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray -D"ENGINE=unsigned" -D"RSA=unsigned" -D"DSA=unsigned" -D"EVP_PKEY=unsigned" -D"EVP_MD=unsigned" -D"SSL=unsigned" -D"SSL_CTX=unsigned" -D"X509=unsigned" -D"RC4_KEY=unsigned" -D"EVP_MD_CTX=unsigned" -D"ECDSA_SIG=DSA_SIG" -Dfstrm_res=int
 # compat with NetBSD
 LINTFLAGS+=@NETBSD_LINTFLAGS@
 # compat with OpenBSD
@@ -432,7 +432,7 @@ realclean: clean
        $(LINT) $(LINTFLAGS) -I. -I$(srcdir) $<
        touch $@
 
-util/configparser.lint util/configlexer.lint pythonmod/pythonmod.lint libunbound/python/libunbound_wrap.lint:
+util/configparser.lint util/configlexer.lint pythonmod/pythonmod.lint libunbound/python/libunbound_wrap.lint dnstap/dnstap.pb-c.lint:
        # skip lint for generated code
        touch $@
 
index f05cdb198e99da71fd7fd56ebb561031d8796d48..f693a0285a2cf27664c44f54da5b32ec45543b10 100644 (file)
@@ -404,7 +404,7 @@ daemon_create_workers(struct daemon* daemon)
        if(daemon->cfg->dnstap) {
 #ifdef USE_DNSTAP
                daemon->dtenv = dt_create(daemon->cfg->dnstap_socket_path,
-                       daemon->num);
+                       (unsigned int)daemon->num);
                if (!daemon->dtenv)
                        fatal_exit("dt_create failed");
                dt_apply_cfg(daemon->dtenv, daemon->cfg);
index 413bd37452a7faa901db87478fed63577214e9c2..d999ffd501561e3f49d183866454bc16fd3f7d07 100644 (file)
@@ -173,7 +173,7 @@ dt_apply_identity(struct dt_env *env, struct config_file *cfg)
        }
        if (env->identity == NULL)
                fatal_exit("dt_apply_identity: strdup() failed");
-       env->len_identity = strlen(env->identity);
+       env->len_identity = (unsigned int)strlen(env->identity);
        verbose(VERB_OPS, "dnstap identity field set to \"%s\"",
                env->identity);
 }
@@ -190,7 +190,7 @@ dt_apply_version(struct dt_env *env, struct config_file *cfg)
                env->version = strdup(cfg->dnstap_version);
        if (env->version == NULL)
                fatal_exit("dt_apply_version: strdup() failed");
-       env->len_version = strlen(env->version);
+       env->len_version = (unsigned int)strlen(env->version);
        verbose(VERB_OPS, "dnstap version field set to \"%s\"",
                env->version);
 }
@@ -203,32 +203,32 @@ dt_apply_cfg(struct dt_env *env, struct config_file *cfg)
 
        dt_apply_identity(env, cfg);
        dt_apply_version(env, cfg);
-       if ((env->log_resolver_query_messages =
+       if ((env->log_resolver_query_messages = (unsigned int)
             cfg->dnstap_log_resolver_query_messages))
        {
                verbose(VERB_OPS, "dnstap Message/RESOLVER_QUERY enabled");
        }
-       if ((env->log_resolver_response_messages =
+       if ((env->log_resolver_response_messages = (unsigned int)
             cfg->dnstap_log_resolver_response_messages))
        {
                verbose(VERB_OPS, "dnstap Message/RESOLVER_RESPONSE enabled");
        }
-       if ((env->log_client_query_messages =
+       if ((env->log_client_query_messages = (unsigned int)
             cfg->dnstap_log_client_query_messages))
        {
                verbose(VERB_OPS, "dnstap Message/CLIENT_QUERY enabled");
        }
-       if ((env->log_client_response_messages =
+       if ((env->log_client_response_messages = (unsigned int)
             cfg->dnstap_log_client_response_messages))
        {
                verbose(VERB_OPS, "dnstap Message/CLIENT_RESPONSE enabled");
        }
-       if ((env->log_forwarder_query_messages =
+       if ((env->log_forwarder_query_messages = (unsigned int)
             cfg->dnstap_log_forwarder_query_messages))
        {
                verbose(VERB_OPS, "dnstap Message/FORWARDER_QUERY enabled");
        }
-       if ((env->log_forwarder_response_messages =
+       if ((env->log_forwarder_response_messages = (unsigned int)
             cfg->dnstap_log_forwarder_response_messages))
        {
                verbose(VERB_OPS, "dnstap Message/FORWARDER_RESPONSE enabled");
@@ -261,8 +261,10 @@ dt_fill_timeval(const struct timeval *tv,
                uint64_t *time_sec, protobuf_c_boolean *has_time_sec,
                uint32_t *time_nsec, protobuf_c_boolean *has_time_nsec)
 {
+#ifndef S_SPLINT_S
        *time_sec = tv->tv_sec;
        *time_nsec = tv->tv_usec * 1000;
+#endif
        *has_time_sec = 1;
        *has_time_nsec = 1;
 }
diff --git a/dnstap/dnstap_config.h b/dnstap/dnstap_config.h
deleted file mode 100644 (file)
index 58fb7e6..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef UNBOUND_DNSTAP_CONFIG_H
-#define UNBOUND_DNSTAP_CONFIG_H
-
-/*
- * Process this file (dnstap_config.h.in) with AC_CONFIG_FILES to generate
- * dnstap_config.h.
- *
- * This file exists so that USE_DNSTAP can be used without including config.h.
- */
-
-#if 1 /* ENABLE_DNSTAP */
-# ifndef USE_DNSTAP
-#  define USE_DNSTAP 1
-# endif
-#endif
-
-#endif /* UNBOUND_DNSTAP_CONFIG_H */
index af82a3e4181d85c621d0c507405b15b598cc6423..6502bdc14e255961cef546151d696e9b4d0f297e 100644 (file)
Binary files a/testdata/01-doc.tpkg and b/testdata/01-doc.tpkg differ