Add merging to DNS_Mgr::AddResult() to support both ipv4 and ipv6 responses simultaneously

This commit is contained in:
Tim Wojtulewicz 2022-01-27 14:44:30 -07:00
parent 9f197aa458
commit 3bdc744b14
4 changed files with 120 additions and 60 deletions

View file

@ -167,6 +167,12 @@ void DNS_Mapping::Save(FILE* f) const
fprintf(f, "%s\n", addr.AsString().c_str());
}
void DNS_Mapping::Merge(DNS_Mapping* other)
{
std::copy(other->names.begin(), other->names.end(), std::back_inserter(names));
std::copy(other->addrs.begin(), other->addrs.end(), std::back_inserter(addrs));
}
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////