Skip to content

Commit

Permalink
DNSdist: Adapt to QType class changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fredmorcos committed Jul 3, 2024
1 parent c77685b commit 09b1bc8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pdns/dnsdistdist/dnsdist-lua-rules.cc
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ void setupLuaRules(LuaContext& luaCtx)
}
else {
string val = boost::get<string>(str);
qtype = QType::chartocode(val.c_str());
qtype = QType::fromString(val);
if (qtype == 0) {
throw std::runtime_error("Unable to convert '" + val + "' to a DNS type");
}
Expand Down
2 changes: 1 addition & 1 deletion pdns/dnsdistdist/dnsdist-rings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ size_t Rings::loadFromFile(const std::string& filepath, const struct timespec& n
/* skip ID */
idx++;
DNSName qname(parts.at(idx++));
QType qtype(QType::chartocode(parts.at(idx++).c_str()));
QType qtype(QType::fromString(parts.at(idx++)));

if (isResponse) {
insertResponse(when, from, qname, qtype.getCode(), 0, 0, dnsHeader, dest, protocol);
Expand Down
2 changes: 1 addition & 1 deletion pdns/dnsdistdist/dnsdist-web.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@ static void handleCacheManagement(const YaHTTP::Request& req, YaHTTP::Response&
return;
}
if (expungeType != req.getvars.end()) {
type = QType::chartocode(expungeType->second.c_str());
type = QType::fromString(expungeType->second);
}

std::shared_ptr<ServerPool> pool;
Expand Down

0 comments on commit 09b1bc8

Please sign in to comment.