}
DNSName relqname = qdomain.makeRelative(hunt);
+ if (relqname.empty()) {
+ return;
+ }
// cout<<"get will look for "<<relqname<< " in zone "<<hunt<<" with id "<<zoneId<<" and type "<<type.toString()<<endl;
d_rotxn = getRecordsROTransaction(zoneId, d_rwtxn);
nl -> nl0
*/
- if (t.isRoot())
+ if (t.empty()) {
+ throw std::out_of_range(std::string(__PRETTY_FUNCTION__) + " Attempt to serialize an unset dnsname");
+ }
+
+ if (t.isRoot()) {
return std::string(1, (char)0);
+ }
+
std::string in = t.labelReverse().toDNSStringLC(); // www.ds9a.nl is now 2nl4ds9a3www0
std::string ret;
ret.reserve(in.size());