Skip to content

Commit b834233

Browse files
authored
Merge pull request #17207 from rgacogne/fix-statnode-fullname-issue
dnsdist-2.0.x: Fix the `StatNode::fullname` issue introduced in 2.0.4
2 parents c87b402 + 82e7773 commit b834233

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pdns/dnsdistdist/dnsdist-lua-inspection.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ void setupLuaInspection(LuaContext& luaCtx)
902902
[](const StatNode& node) -> unsigned int {
903903
return node.children.size();
904904
});
905-
luaCtx.registerMember<std::string(StatNode::*)>(std::string("fullname"), [](const StatNode& node) -> std::string { return node.fullname.toString(); });
905+
luaCtx.registerMember<std::string(StatNode::*)>(std::string("fullname"), [](const StatNode& node) -> std::string { return !node.fullname.empty() ? node.fullname.toString() : ""; });
906906
luaCtx.registerMember("labelsCount", &StatNode::labelsCount);
907907
luaCtx.registerMember("servfails", &StatNode::Stat::servfails);
908908
luaCtx.registerMember("nxdomains", &StatNode::Stat::nxdomains);

0 commit comments

Comments
 (0)