mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 13:32:47 +01:00
net: require lookup functions to specify all arguments
To make it clear where DNS resolves are happening
This commit is contained in:
parent
73fc922ed6
commit
e9fc71e5fa
@ -1443,7 +1443,7 @@ void ThreadDNSAddressSeed()
|
|||||||
} else {
|
} else {
|
||||||
vector<CNetAddr> vIPs;
|
vector<CNetAddr> vIPs;
|
||||||
vector<CAddress> vAdd;
|
vector<CAddress> vAdd;
|
||||||
if (LookupHost(seed.host.c_str(), vIPs))
|
if (LookupHost(seed.host.c_str(), vIPs, 0, true))
|
||||||
{
|
{
|
||||||
BOOST_FOREACH(const CNetAddr& ip, vIPs)
|
BOOST_FOREACH(const CNetAddr& ip, vIPs)
|
||||||
{
|
{
|
||||||
@ -1884,7 +1884,7 @@ void static Discover(boost::thread_group& threadGroup)
|
|||||||
if (gethostname(pszHostName, sizeof(pszHostName)) != SOCKET_ERROR)
|
if (gethostname(pszHostName, sizeof(pszHostName)) != SOCKET_ERROR)
|
||||||
{
|
{
|
||||||
vector<CNetAddr> vaddr;
|
vector<CNetAddr> vaddr;
|
||||||
if (LookupHost(pszHostName, vaddr))
|
if (LookupHost(pszHostName, vaddr, 0, true))
|
||||||
{
|
{
|
||||||
BOOST_FOREACH (const CNetAddr &addr, vaddr)
|
BOOST_FOREACH (const CNetAddr &addr, vaddr)
|
||||||
{
|
{
|
||||||
|
@ -206,9 +206,9 @@ bool GetProxy(enum Network net, proxyType &proxyInfoOut);
|
|||||||
bool IsProxy(const CNetAddr &addr);
|
bool IsProxy(const CNetAddr &addr);
|
||||||
bool SetNameProxy(const proxyType &addrProxy);
|
bool SetNameProxy(const proxyType &addrProxy);
|
||||||
bool HaveNameProxy();
|
bool HaveNameProxy();
|
||||||
bool LookupHost(const char *pszName, std::vector<CNetAddr>& vIP, unsigned int nMaxSolutions = 0, bool fAllowLookup = true);
|
bool LookupHost(const char *pszName, std::vector<CNetAddr>& vIP, unsigned int nMaxSolutions, bool fAllowLookup);
|
||||||
bool Lookup(const char *pszName, CService& addr, int portDefault = 0, bool fAllowLookup = true);
|
bool Lookup(const char *pszName, CService& addr, int portDefault, bool fAllowLookup);
|
||||||
bool Lookup(const char *pszName, std::vector<CService>& vAddr, int portDefault = 0, bool fAllowLookup = true, unsigned int nMaxSolutions = 0);
|
bool Lookup(const char *pszName, std::vector<CService>& vAddr, int portDefault, bool fAllowLookup, unsigned int nMaxSolutions);
|
||||||
bool LookupNumeric(const char *pszName, CService& addr, int portDefault = 0);
|
bool LookupNumeric(const char *pszName, CService& addr, int portDefault = 0);
|
||||||
bool ConnectSocket(const CService &addr, SOCKET& hSocketRet, int nTimeout, bool *outProxyConnectionFailed = 0);
|
bool ConnectSocket(const CService &addr, SOCKET& hSocketRet, int nTimeout, bool *outProxyConnectionFailed = 0);
|
||||||
bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault, int nTimeout, bool *outProxyConnectionFailed = 0);
|
bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault, int nTimeout, bool *outProxyConnectionFailed = 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user