From: Wouter Wijngaards Date: Thu, 12 Mar 2009 09:36:28 +0000 (+0000) Subject: log and tests fixups. X-Git-Tag: release-1.3.0~102 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ac4535d4e5004cd66b7b5e090479476c586ed400;p=thirdparty%2Funbound.git log and tests fixups. git-svn-id: file:///svn/unbound/trunk@1521 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 0038b5fa7..c0456f0c7 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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. diff --git a/smallapp/unbound-checkconf.c b/smallapp/unbound-checkconf.c index d49de9bf4..7e416ec53 100644 --- a/smallapp/unbound-checkconf.c +++ b/smallapp/unbound-checkconf.c @@ -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); diff --git a/testcode/testbound.c b/testcode/testbound.c index 6a7866040..ca0115f3d 100644 --- a/testcode/testbound.c +++ b/testcode/testbound.c @@ -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), diff --git a/testdata/04-checkconf.tpkg b/testdata/04-checkconf.tpkg index af28ded07..82483e64c 100644 Binary files a/testdata/04-checkconf.tpkg and b/testdata/04-checkconf.tpkg differ diff --git a/util/log.c b/util/log.c index 0f6ef07da..ef822023b 100644 --- a/util/log.c +++ b/util/log.c @@ -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);