setEDNSOption(dq, code, data);
});
- luaCtx.registerFunction<void(DNSQuestion::*)(uint16_t infoCode, const boost::optional<std::string>& extraText)>("setExtendedDNSError", [](DNSQuestion& dq, uint16_t infoCode, const boost::optional<std::string>& extraText) {
+ luaCtx.registerFunction<void(DNSQuestion::*)(uint16_t infoCode, const boost::optional<std::string>& extraText)>("setExtendedDNSError", [](DNSQuestion& dnsQuestion, uint16_t infoCode, const boost::optional<std::string>& extraText) {
EDNSExtendedError ede;
ede.infoCode = infoCode;
if (extraText) {
ede.extraText = *extraText;
}
- dq.ids.d_extendedError = std::make_unique<EDNSExtendedError>(ede);
+ dnsQuestion.ids.d_extendedError = std::make_unique<EDNSExtendedError>(ede);
});
luaCtx.registerFunction<bool(DNSQuestion::*)(uint16_t asyncID, uint16_t queryID, uint32_t timeoutMs)>("suspend", [](DNSQuestion& dq, uint16_t asyncID, uint16_t queryID, uint32_t timeoutMs) {
return setNegativeAndAdditionalSOA(dq, nxd, DNSName(zone), ttl, DNSName(mname), DNSName(rname), serial, refresh, retry, expire, minimum, false);
});
- luaCtx.registerFunction<void(DNSResponse::*)(uint16_t infoCode, const boost::optional<std::string>& extraText)>("setExtendedDNSError", [](DNSResponse& dr, uint16_t infoCode, const boost::optional<std::string>& extraText) {
+ luaCtx.registerFunction<void(DNSResponse::*)(uint16_t infoCode, const boost::optional<std::string>& extraText)>("setExtendedDNSError", [](DNSResponse& dnsResponse, uint16_t infoCode, const boost::optional<std::string>& extraText) {
EDNSExtendedError ede;
ede.infoCode = infoCode;
if (extraText) {
ede.extraText = *extraText;
}
- dr.ids.d_extendedError = std::make_unique<EDNSExtendedError>(ede);
+ dnsResponse.ids.d_extendedError = std::make_unique<EDNSExtendedError>(ede);
});
luaCtx.registerFunction<bool(DNSResponse::*)(uint16_t asyncID, uint16_t queryID, uint32_t timeoutMs)>("suspend", [](DNSResponse& dr, uint16_t asyncID, uint16_t queryID, uint32_t timeoutMs) {
#endif
}
-void dnsdist_ffi_dnsquestion_set_extended_dns_error(dnsdist_ffi_dnsquestion_t* dq, uint16_t infoCode, const char* extraText, size_t extraTextSize)
+void dnsdist_ffi_dnsquestion_set_extended_dns_error(dnsdist_ffi_dnsquestion_t* dnsQuestion, uint16_t infoCode, const char* extraText, size_t extraTextSize)
{
EDNSExtendedError ede;
ede.infoCode = infoCode;
if (extraText != nullptr && extraTextSize > 0) {
ede.extraText = std::string(extraText, extraTextSize);
}
- dq->dq->ids.d_extendedError = std::make_unique<EDNSExtendedError>(ede);
+ dnsQuestion->dq->ids.d_extendedError = std::make_unique<EDNSExtendedError>(ede);
}
void dnsdist_ffi_dnsquestion_set_rcode(dnsdist_ffi_dnsquestion_t* dq, int rcode)