From: Wouter Wijngaards Date: Mon, 22 Mar 2010 09:23:30 +0000 (+0000) Subject: Fixup unbound-host. X-Git-Tag: release-1.4.4rc1~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e9b6092d0a425e78c72a2abc3c6a8ab876dbdec;p=thirdparty%2Funbound.git Fixup unbound-host. git-svn-id: file:///svn/unbound/trunk@2056 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index a91c03fd7..2ffbc693e 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +22 March 2010: Wouter + - unbound-host disables use-syslog from config file so that the + config file for the main server can be used more easily. + 19 March 2010: Wouter - fix fwd_ancil test to pass if the socket options are not supported. diff --git a/smallapp/unbound-host.c b/smallapp/unbound-host.c index 2a663a9d4..8b96c3576 100644 --- a/smallapp/unbound-host.c +++ b/smallapp/unbound-host.c @@ -497,6 +497,12 @@ int main(int argc, char* argv[]) } if(debuglevel != 0) /* set after possible -C options */ check_ub_res(ub_ctx_debuglevel(ctx, debuglevel)); + if(ub_ctx_get_option(ctx, "use-syslog", &optarg) == 0) { + if(strcmp(optarg, "yes") == 0) /* disable use-syslog */ + check_ub_res(ub_ctx_set_option(ctx, + "use-syslog:", "no")); + free(optarg); + } argc -= optind; argv += optind; if(argc != 1) diff --git a/util/config_file.c b/util/config_file.c index e818df9a2..aca82e146 100644 --- a/util/config_file.c +++ b/util/config_file.c @@ -530,6 +530,7 @@ config_get_option(struct config_file* cfg, const char* opt, else O_DEC(opt, "statistics-interval", stat_interval) else O_YNO(opt, "statistics-cumulative", stat_cumulative) else O_YNO(opt, "extended-statistics", stat_extended) + else O_YNO(opt, "use-syslog", use_syslog) else O_DEC(opt, "num-threads", num_threads) else O_IFC(opt, "interface", num_ifs, ifs) else O_IFC(opt, "outgoing-interface", num_out_ifs, out_ifs)