]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Use proper conversions on bind backend
authorAki Tuomi <cmouse@desteem.org>
Fri, 11 Dec 2015 14:32:16 +0000 (16:32 +0200)
committerAki Tuomi <cmouse@desteem.org>
Mon, 21 Dec 2015 12:52:00 +0000 (14:52 +0200)
modules/bindbackend/binddnssec.cc

index 4066e39db2853e47b64ea55134605be795ae267f..9d15e61e5e64e18291a478e2d9cd72aceb0db7fb 100644 (file)
@@ -268,9 +268,9 @@ bool Bind2Backend::getDomainKeys(const DNSName& name, unsigned int kind, std::ve
     SSqlStatement::row_t row;
     while(d_getDomainKeysQuery_stmt->hasNextRow()) {
       d_getDomainKeysQuery_stmt->nextRow(row);
-      kd.id = atoi(row[0].c_str());
-      kd.flags = atoi(row[1].c_str());
-      kd.active = atoi(row[2].c_str());
+      kd.id = pdns_stou(row[0]);
+      kd.flags = pdns_stou(row[1]);
+      kd.active = (row[2] == "1");
       kd.content = row[3];
       keys.push_back(kd);
     }