From: Peter van Dijk Date: Sun, 28 May 2023 20:39:33 +0000 (+0200) Subject: pdnsutil: if user pushes unknown key in response to "problem with zone" prompt, do... X-Git-Tag: rec-4.10.0-alpha0~21^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F12859%2Fhead;p=thirdparty%2Fpdns.git pdnsutil: if user pushes unknown key in response to "problem with zone" prompt, do not throw away their changes --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 18b10c24bf..6e0466a970 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -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; + } }