]> granicus.if.org Git - pdns/commitdiff
please don't just replace atoi with pdns_stou - it does something different
authorbert hubert <bert.hubert@netherlabs.nl>
Wed, 2 Mar 2016 13:58:09 +0000 (14:58 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Wed, 2 Mar 2016 14:03:12 +0000 (15:03 +0100)
pdns/pdnsutil.cc

index 441303895653fd73db522e3a8dcecab7888e3b94..8d15e2ab470444926f7da18bb0b8d9fe9b5347f8 100644 (file)
@@ -2069,10 +2069,10 @@ seedRandom(::arg()["entropy-source"]);
       return 0;
     }
     DNSName zone(cmds[1]);
-    unsigned int id=pdns_stou(cmds[2]);
+    unsigned int id=atoi(cmds[2].c_str()); // if you make this pdns_stou, the error gets worse
     if(!id)
     {
-      cerr<<"Invalid KEY-ID"<<endl;
+      cerr<<"Invalid KEY-ID '"<<cmds[2]<<"'"<<endl;
       return 1;
     }
     if (!dk.activateKey(zone, id)) {