log and tests fixups.

git-svn-id: file:///svn/unbound/trunk@1521 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2009-03-12 09:36:28 +00:00
parent 8c2d5d42d9
commit ac4535d4e5
5 changed files with 22 additions and 4 deletions

View 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.

View 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);

View 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),

Binary file not shown.

View 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);