diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/dns_utils.cpp | 17 | ||||
-rw-r--r-- | src/common/dns_utils.h | 9 | ||||
-rw-r--r-- | src/common/threadpool.h | 1 |
3 files changed, 3 insertions, 24 deletions
diff --git a/src/common/dns_utils.cpp b/src/common/dns_utils.cpp index e00421f87..466224390 100644 --- a/src/common/dns_utils.cpp +++ b/src/common/dns_utils.cpp @@ -30,6 +30,8 @@ // check local first (in the event of static or in-source compilation of libunbound) #include "unbound.h" +#include <deque> +#include <set> #include <stdlib.h> #include "include_base_utils.h" #include "common/threadpool.h" @@ -326,11 +328,6 @@ std::vector<std::string> DNSResolver::get_record(const std::string& url, int rec dnssec_available = false; dnssec_valid = false; - if (!check_address_syntax(url.c_str())) - { - return addresses; - } - // destructor takes care of cleanup ub_result_ptr result; @@ -413,16 +410,6 @@ DNSResolver DNSResolver::create() return DNSResolver(); } -bool DNSResolver::check_address_syntax(const char *addr) const -{ - // if string doesn't contain a dot, we won't consider it a url for now. - if (strchr(addr,'.') == NULL) - { - return false; - } - return true; -} - namespace dns_utils { diff --git a/src/common/dns_utils.h b/src/common/dns_utils.h index f9507b42a..81079ba30 100644 --- a/src/common/dns_utils.h +++ b/src/common/dns_utils.h @@ -159,15 +159,6 @@ private: // TODO: modify this to accommodate DNSSEC std::vector<std::string> get_record(const std::string& url, int record_type, boost::optional<std::string> (*reader)(const char *,size_t), bool& dnssec_available, bool& dnssec_valid); - /** - * @brief Checks a string to see if it looks like a URL - * - * @param addr the string to be checked - * - * @return true if it looks enough like a URL, false if not - */ - bool check_address_syntax(const char *addr) const; - DNSResolverData *m_data; }; // class DNSResolver diff --git a/src/common/threadpool.h b/src/common/threadpool.h index 53421e18b..fcf8ca945 100644 --- a/src/common/threadpool.h +++ b/src/common/threadpool.h @@ -31,6 +31,7 @@ #include <boost/thread/mutex.hpp> #include <boost/thread/thread.hpp> #include <cstddef> +#include <deque> #include <functional> #include <utility> #include <vector> |