/**
- * Get the actual IP of this host through a DNS query.
+ * Get the actual IP of the given host through a DNS query.
* @param _hostname The hostname for the dns lookup, if empty string, then perform a dns lookup to the local hostname.
* @return A string representation of the actual IP in dotted format or an empty string if something went wrong.
*/
net::ip::tcp::resolver::iterator end;
while(endpoint_iterator != end)
{
- net::ip::tcp::endpoint endpoint = endpoint_iterator->endpoint(); // this ends up in a compiler warning: cc1plus: warning: dereferencing pointer 'pretmp.37188' does break strict-aliasing rules
- net::ip::address ip = endpoint.address(); // but why?
+ net::ip::address ip;
+ ip = endpoint_iterator->endpoint().address();
if ( ip.is_v4() )
ip_addr_v4 = ip.to_string();
else if ( ip.is_v6() )
*/
string ServiceEasydns::get_two_level_tld(const string& domain_part) const
{
- // TODO: There is a list with all two level TLD's, use it
-
// split the domain_part
list<string> domain_tokens;
ba::split(domain_tokens,domain_part,boost::is_any_of("."));