mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 02:18:04 +01:00
integrated changes from 1.3.5
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// DNS.cpp
|
||||
//
|
||||
// $Id: //poco/Main/Net/src/DNS.cpp#10 $
|
||||
// $Id: //poco/Main/Net/src/DNS.cpp#11 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: NetCore
|
||||
@@ -137,6 +137,7 @@ HostEntry DNS::hostByAddress(const IPAddress& address)
|
||||
struct addrinfo* pAI;
|
||||
struct addrinfo hints;
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_flags = AI_CANONNAME;
|
||||
if (getaddrinfo(fqname, NULL, &hints, &pAI) == 0)
|
||||
{
|
||||
std::pair<DNSCache::iterator, bool> res = _cache.insert(std::pair<std::string, HostEntry>(std::string(fqname), HostEntry(pAI)));
|
||||
|
||||
Reference in New Issue
Block a user