]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fixup unbound-host.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 22 Mar 2010 09:23:30 +0000 (09:23 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 22 Mar 2010 09:23:30 +0000 (09:23 +0000)
git-svn-id: file:///svn/unbound/trunk@2056 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
smallapp/unbound-host.c
util/config_file.c

index a91c03fd72106d75e0ce731e83e9325d4972a5c6..2ffbc693e24b74f78804a37ac2d304df8aab5bb9 100644 (file)
@@ -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.
 
index 2a663a9d4a4c5d54fd84f5548009ae56082a599f..8b96c3576c1e9dbd8c88c337445095edc56d128f 100644 (file)
@@ -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)
index e818df9a21ad6f3f88ca1ef9edbc82d9e42d0660..aca82e1461120cf452952bb18eaa41b85fa3bceb 100644 (file)
@@ -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)