Changeset View
Changeset View
Standalone View
Standalone View
src/netbase.cpp
Show First 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
bool Lookup(const char *pszName, std::vector<CService> &vAddr, int portDefault, | bool Lookup(const char *pszName, std::vector<CService> &vAddr, int portDefault, | ||||
bool fAllowLookup, unsigned int nMaxSolutions) { | bool fAllowLookup, unsigned int nMaxSolutions) { | ||||
if (pszName[0] == 0) { | if (pszName[0] == 0) { | ||||
return false; | return false; | ||||
} | } | ||||
int port = portDefault; | int port = portDefault; | ||||
std::string hostname = ""; | std::string hostname; | ||||
SplitHostPort(std::string(pszName), port, hostname); | SplitHostPort(std::string(pszName), port, hostname); | ||||
std::vector<CNetAddr> vIP; | std::vector<CNetAddr> vIP; | ||||
bool fRet = | bool fRet = | ||||
LookupIntern(hostname.c_str(), vIP, nMaxSolutions, fAllowLookup); | LookupIntern(hostname.c_str(), vIP, nMaxSolutions, fAllowLookup); | ||||
if (!fRet) { | if (!fRet) { | ||||
return false; | return false; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 621 Lines • Show Last 20 Lines |