]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
ixfrdist: after --help or --version, exit (includes var rename) 13094/head
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Mon, 14 Aug 2023 13:32:30 +0000 (15:32 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Mon, 14 Aug 2023 13:39:29 +0000 (15:39 +0200)
pdns/ixfrdist.cc

index d5fb1953547c5c7745b810826b800dee9c575dfa..29b16ff13eec443c466d1e68dad255fa1829c786 100644 (file)
@@ -1194,7 +1194,7 @@ struct IXFRDistConfiguration
   uint16_t tcpInThreads{0};
   uid_t uid{0};
   gid_t gid{0};
-  bool done{false};
+  bool shouldExit{false};
 };
 
 static std::optional<IXFRDistConfiguration> parseConfiguration(int argc, char** argv, FDMultiplexer& fdm)
@@ -1218,11 +1218,13 @@ static std::optional<IXFRDistConfiguration> parseConfiguration(int argc, char**
 
     if (g_vm.count("help") > 0) {
       usage(desc);
+      configuration.shouldExit = true;
       return configuration;
     }
 
     if (g_vm.count("version") > 0) {
       cout<<"ixfrdist "<<VERSION<<endl;
+      configuration.shouldExit = true;
       return configuration;
     }
 
@@ -1435,7 +1437,7 @@ int main(int argc, char** argv) {
       return EXIT_FAILURE;
     }
 
-    if (configuration->done) {
+    if (configuration->shouldExit) {
       return EXIT_SUCCESS;
     }
   }