]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
unbound-host -d and -C fix
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 2 Oct 2009 07:51:36 +0000 (07:51 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 2 Oct 2009 07:51:36 +0000 (07:51 +0000)
git-svn-id: file:///svn/unbound/trunk@1856 be551aaa-1e26-0410-a405-d3ace91eadb9

smallapp/unbound-host.c

index 470fd7eac13d8aef13a65590253606cad6e9e0ef..d46c753fb177708cfb706b3805a1c91bbacab7b4 100644 (file)
@@ -440,7 +440,6 @@ int main(int argc, char* argv[])
                        debuglevel++;
                        if(debuglevel < 2) 
                                debuglevel = 2; /* at least VERB_DETAIL */
-                       check_ub_res(ub_ctx_debuglevel(ctx, debuglevel));
                        break;
                case 'r':
                        check_ub_res(ub_ctx_resolvconf(ctx, "/etc/resolv.conf"));
@@ -466,6 +465,8 @@ int main(int argc, char* argv[])
                        usage();
                }
        }
+       if(debuglevel != 0) /* set after possible -C options */
+               check_ub_res(ub_ctx_debuglevel(ctx, debuglevel));
        argc -= optind;
        argv += optind;
        if(argc != 1)