]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
log and tests fixups.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 12 Mar 2009 09:36:28 +0000 (09:36 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 12 Mar 2009 09:36:28 +0000 (09:36 +0000)
git-svn-id: file:///svn/unbound/trunk@1521 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
smallapp/unbound-checkconf.c
testcode/testbound.c
testdata/04-checkconf.tpkg
util/log.c

index 0038b5fa74c123f1807ee9ee7884dca4e52f9cd4..c0456f0c70725a625ac30f3e304b55aaa7eb52e0 100644 (file)
@@ -1,3 +1,7 @@
+12 March 2009: Wouter
+       - log to App.logs on windows prints executable identity.
+       - fixup tests.
+
 11 March 2009: Wouter
        - winsock event handler resets WSAevents after signalled.
        - winsock event handler tests if signals are really signalled.
index d49de9bf410ce6ef19b6447a2df6265c6b39c044..7e416ec53a31a9e5d5ec17d9250f206ecbe5ab16 100644 (file)
@@ -49,6 +49,7 @@
 #include "util/net_help.h"
 #include "util/regional.h"
 #include "iterator/iterator.h"
+#include "iterator/iter_fwd.h"
 #include "validator/validator.h"
 #include "services/localzone.h"
 #ifdef HAVE_PWD_H
@@ -520,6 +521,17 @@ morechecks(struct config_file* cfg, const char* fname)
        localzonechecks(cfg);
 }
 
+/** check forwards */
+static void
+check_fwd(struct config_file* cfg)
+{
+       struct iter_forwards* fwd = forwards_create();
+       if(!fwd || !forwards_apply_cfg(fwd, cfg)) {
+               fatal_exit("Could not set forward zones");
+       }
+       forwards_delete(fwd);
+}
+
 /** check config file */
 static void
 checkconf(const char* cfgfile, const char* opt)
@@ -535,6 +547,7 @@ checkconf(const char* cfgfile, const char* opt)
        morechecks(cfg, cfgfile);
        check_mod(cfg, iter_get_funcblock());
        check_mod(cfg, val_get_funcblock());
+       check_fwd(cfg);
        if(opt) print_option(cfg, opt);
        else    printf("unbound-checkconf: no errors in %s\n", cfgfile);
        config_delete(cfg);
index 6a7866040b366ea274f96be0b21c0c1b5feeddd4..ca0115f3df5b670ecc751e0a3835e07a9a532555 100644 (file)
@@ -320,14 +320,15 @@ int remote_control_callback(struct comm_point* ATTR_UNUSED(c),
 }
 
 void wsvc_command_option(const char* ATTR_UNUSED(wopt), 
-       const char* ATTR_UNUSED(cfgfile), int ATTR_UNUSED(v))
+       const char* ATTR_UNUSED(cfgfile), int ATTR_UNUSED(v), 
+       int ATTR_UNUSED(c))
 {
        log_assert(0);
 }
 
 void wsvc_setup_worker(struct worker* ATTR_UNUSED(worker))
 {
-       log_assert(0);
+       /* do nothing */
 }
 
 void worker_win_stop_cb(int ATTR_UNUSED(fd), short ATTR_UNUSED(ev),
index af28ded0748946003c0a0e576f6b7ebaab429963..82483e64c332f8f8cd01b88bd01386cc18fd250d 100644 (file)
Binary files a/testdata/04-checkconf.tpkg and b/testdata/04-checkconf.tpkg differ
index 0f6ef07dad3267b36d4d9c405714f6089f42f632..ef822023b4d4cfb57b1a8e2b612099f37edb8f70 100644 (file)
@@ -194,8 +194,8 @@ log_vmsg(int pri, const char* type,
                        tp=MSG_GENERIC_SUCCESS;
                        wt=EVENTLOG_SUCCESS;
                }
-               snprintf(m, sizeof(m), "[unbound:%x] %s: %s", 
-                       tid?*tid:0, type, message);
+               snprintf(m, sizeof(m), "[%s:%x] %s: %s", 
+                       ident, tid?*tid:0, type, message);
                s = RegisterEventSource(NULL, SERVICE_NAME);
                if(!s) return;
                ReportEvent(s, wt, 0, tp, NULL, 1, 0, &str, NULL);