]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
pdnsutil: if user pushes unknown key in response to "problem with zone" prompt, do... 12859/head
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Sun, 28 May 2023 20:39:33 +0000 (22:39 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Sun, 28 May 2023 20:39:33 +0000 (22:39 +0200)
pdns/pdnsutil.cc

index 18b10c24bfe29618b23ff4d9f625fed6da2401a5..6e0466a9705f78323bebd7f4dc32a6999bdc1ae7 100644 (file)
@@ -1264,16 +1264,17 @@ static int editZone(const DNSName &zone, const PDNSColors& col) {
     cerr << col.red() << col.bold() << "There was a problem with your zone" << col.rst() << "\nOptions are: (e)dit your changes, (r)etry with original zone, (a)pply change anyhow, (q)uit: " << std::flush;
     int c=read1char();
     cerr<<"\n";
-    if(c!='a')
+    if(c=='e') {
       post.clear();
-    if(c=='e')
       goto editMore;
-    else if(c=='r')
+    } else if(c=='r') {
+      post.clear();
       goto editAgain;
-    else if(c=='q')
+    } else if(c=='q') {
       return EXIT_FAILURE;
-    else if(c!='a')
+    } else if(c!='a') {
       goto reAsk;
+    }
   }