]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
make SIGUSR2 a toggle instead of 'on for now and forever'. USR2 is undocumented btw.
authorbert hubert <bert.hubert@netherlabs.nl>
Fri, 21 Mar 2014 20:40:02 +0000 (21:40 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Fri, 21 Mar 2014 20:40:02 +0000 (21:40 +0100)
pdns/pdns_recursor.cc

index 67d0cbd0ccab1bd0bb3b68f36e363f41ca2e3690..e275c3d0e7d8d7e7f41b2991b30bcf201ea222b2 100644 (file)
@@ -1103,10 +1103,9 @@ void usr1Handler(int)
 
 void usr2Handler(int)
 {
-  SyncRes::setDefaultLogMode(SyncRes::Log);
-  g_quiet=false;
-  ::arg().set("quiet")="no";
-
+  g_quiet= !g_quiet;
+  SyncRes::setDefaultLogMode(g_quiet ? SyncRes::LogNone : SyncRes::Log);
+  ::arg().set("quiet")=g_quiet ? "" : "no";
 }
 
 void doStats(void)