]> granicus.if.org Git - pdns/commitdiff
Change output back to cout if exportDS is not set
authorJonas Wielicki <j.wielicki@sotecware.net>
Thu, 16 Jun 2016 14:01:19 +0000 (16:01 +0200)
committerJonas Wielicki <j.wielicki@sotecware.net>
Tue, 6 Sep 2016 11:33:41 +0000 (13:33 +0200)
pdns/pdnsutil.cc

index 6ab74bd8b48052374e07137a8d4ba9a6867ffa0b..945c1c2f52a12b8ac3e635f8babc9271bf760f53 100644 (file)
@@ -1567,7 +1567,8 @@ bool showZone(DNSSECKeeper& dk, const DNSName& zone, bool exportDS = false)
   }
 
   if(!dk.isSecuredZone(zone)) {
-    cerr<<"Zone is not actively secured"<<endl;
+    auto &outstream = (exportDS ? cerr : cout);
+    outstream << "Zone is not actively secured" << endl;
     if (exportDS) {
       // it does not make sense to proceed here, and it might be useful
       // for scripts to know that something is odd here