Remove LDNS dep and fix a bug in libunbound const correctness fix

This commit is contained in:
Thomas Winget 2014-09-24 23:19:14 -04:00
parent 2248124453
commit fab95aef64
No known key found for this signature in database
GPG Key ID: 58131A160789E630
2 changed files with 4 additions and 4 deletions

View File

@ -125,7 +125,7 @@ std::vector<std::string> DNSResolver::get_ipv4(const std::string& url)
strncpy(urlC, url.c_str(), 999);
urlC[999] = '\0';
if (!check_address_syntax(url))
if (!check_address_syntax(urlC))
{
return addresses;
}
@ -156,7 +156,7 @@ std::vector<std::string> DNSResolver::get_ipv6(const std::string& url)
strncpy(urlC, url.c_str(), 999);
urlC[999] = '\0';
if (!check_address_syntax(url))
if (!check_address_syntax(urlC))
{
return addresses;
}
@ -186,7 +186,7 @@ std::vector<std::string> DNSResolver::get_txt_record(const std::string& url)
strncpy(urlC, url.c_str(), 999);
urlC[999] = '\0';
if (!check_address_syntax(url))
if (!check_address_syntax(urlC))
{
return records;
}

View File

@ -35,7 +35,7 @@ namespace tools
// RFC defines for record types and classes for DNS, gleaned from ldns source
const static int DNS_CLASS_IN = 1;
const static int DNS_TYPE_A = 1;
const static int DNS_TYPE_TXT = 6;
const static int DNS_TYPE_TXT = 16;
const static int DNS_TYPE_AAAA = 8;
struct DNSResolverData;