mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
log and tests fixups.
git-svn-id: file:///svn/unbound/trunk@1521 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
8c2d5d42d9
commit
ac4535d4e5
5 changed files with 22 additions and 4 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
12 March 2009: Wouter
|
||||||
|
- log to App.logs on windows prints executable identity.
|
||||||
|
- fixup tests.
|
||||||
|
|
||||||
11 March 2009: Wouter
|
11 March 2009: Wouter
|
||||||
- winsock event handler resets WSAevents after signalled.
|
- winsock event handler resets WSAevents after signalled.
|
||||||
- winsock event handler tests if signals are really signalled.
|
- winsock event handler tests if signals are really signalled.
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@
|
||||||
#include "util/net_help.h"
|
#include "util/net_help.h"
|
||||||
#include "util/regional.h"
|
#include "util/regional.h"
|
||||||
#include "iterator/iterator.h"
|
#include "iterator/iterator.h"
|
||||||
|
#include "iterator/iter_fwd.h"
|
||||||
#include "validator/validator.h"
|
#include "validator/validator.h"
|
||||||
#include "services/localzone.h"
|
#include "services/localzone.h"
|
||||||
#ifdef HAVE_PWD_H
|
#ifdef HAVE_PWD_H
|
||||||
|
|
@ -520,6 +521,17 @@ morechecks(struct config_file* cfg, const char* fname)
|
||||||
localzonechecks(cfg);
|
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 */
|
/** check config file */
|
||||||
static void
|
static void
|
||||||
checkconf(const char* cfgfile, const char* opt)
|
checkconf(const char* cfgfile, const char* opt)
|
||||||
|
|
@ -535,6 +547,7 @@ checkconf(const char* cfgfile, const char* opt)
|
||||||
morechecks(cfg, cfgfile);
|
morechecks(cfg, cfgfile);
|
||||||
check_mod(cfg, iter_get_funcblock());
|
check_mod(cfg, iter_get_funcblock());
|
||||||
check_mod(cfg, val_get_funcblock());
|
check_mod(cfg, val_get_funcblock());
|
||||||
|
check_fwd(cfg);
|
||||||
if(opt) print_option(cfg, opt);
|
if(opt) print_option(cfg, opt);
|
||||||
else printf("unbound-checkconf: no errors in %s\n", cfgfile);
|
else printf("unbound-checkconf: no errors in %s\n", cfgfile);
|
||||||
config_delete(cfg);
|
config_delete(cfg);
|
||||||
|
|
|
||||||
|
|
@ -320,14 +320,15 @@ int remote_control_callback(struct comm_point* ATTR_UNUSED(c),
|
||||||
}
|
}
|
||||||
|
|
||||||
void wsvc_command_option(const char* ATTR_UNUSED(wopt),
|
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);
|
log_assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wsvc_setup_worker(struct worker* ATTR_UNUSED(worker))
|
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),
|
void worker_win_stop_cb(int ATTR_UNUSED(fd), short ATTR_UNUSED(ev),
|
||||||
|
|
|
||||||
BIN
testdata/04-checkconf.tpkg
vendored
BIN
testdata/04-checkconf.tpkg
vendored
Binary file not shown.
|
|
@ -194,8 +194,8 @@ log_vmsg(int pri, const char* type,
|
||||||
tp=MSG_GENERIC_SUCCESS;
|
tp=MSG_GENERIC_SUCCESS;
|
||||||
wt=EVENTLOG_SUCCESS;
|
wt=EVENTLOG_SUCCESS;
|
||||||
}
|
}
|
||||||
snprintf(m, sizeof(m), "[unbound:%x] %s: %s",
|
snprintf(m, sizeof(m), "[%s:%x] %s: %s",
|
||||||
tid?*tid:0, type, message);
|
ident, tid?*tid:0, type, message);
|
||||||
s = RegisterEventSource(NULL, SERVICE_NAME);
|
s = RegisterEventSource(NULL, SERVICE_NAME);
|
||||||
if(!s) return;
|
if(!s) return;
|
||||||
ReportEvent(s, wt, 0, tp, NULL, 1, 0, &str, NULL);
|
ReportEvent(s, wt, 0, tp, NULL, 1, 0, &str, NULL);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue