]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
make calidns print syntax if invoked incorrectly
authorbert hubert <bert.hubert@netherlabs.nl>
Thu, 11 Feb 2016 10:12:32 +0000 (11:12 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Thu, 11 Feb 2016 10:12:32 +0000 (11:12 +0100)
pdns/calidns.cc

index 47999d4e58b7d08a80240f20515a745c726d2681..71165db5a7509981821c7af85fbf7978ef9d014e 100644 (file)
@@ -135,6 +135,10 @@ try
   struct sched_param param;
   param.sched_priority=99;
 
+  if(argc != 4) {
+    cerr<<"Syntax: calidns file-with-queries destination qps-goal"<<endl;
+    exit(EXIT_FAILURE);
+  }
   if(sched_setscheduler(0, SCHED_FIFO, &param) < 0)
     unixDie("setting scheduler");