X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fnet.cpp;h=b91a8f69c64e5c6645b33768c7aaa22e5255aea4;hb=c981d768b3cb0cf0879b3d70d3b548692fff0882;hp=cdd72fddd314d017b573eda3901447fb76bc68ef;hpb=8498c591448d01a8a8ccc5ad1e8cbee9dbcf1500;p=novacoin.git diff --git a/src/net.cpp b/src/net.cpp index cdd72fd..b91a8f6 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -137,7 +137,7 @@ bool GetMyExternalIP2(const CService& addrConnect, const char* pszGet, const cha // We now get our external IP from the IRC server first and only use this as a backup bool GetMyExternalIP(CNetAddr& ipRet) { - CAddress addrConnect; + CService addrConnect; const char* pszGet; const char* pszKeyword; @@ -153,7 +153,7 @@ bool GetMyExternalIP(CNetAddr& ipRet) // if (nHost == 1) { - addrConnect = CAddress("91.198.22.70",80); // checkip.dyndns.org + addrConnect = CService("91.198.22.70",80); // checkip.dyndns.org if (nLookup == 1) { @@ -172,7 +172,7 @@ bool GetMyExternalIP(CNetAddr& ipRet) } else if (nHost == 2) { - addrConnect = CAddress("74.208.43.192", 80); // www.showmyip.com + addrConnect = CService("74.208.43.192", 80); // www.showmyip.com if (nLookup == 1) { @@ -529,8 +529,8 @@ void CNode::PushVersion() { /// when NTP implemented, change to just nTime = GetAdjustedTime() int64 nTime = (fInbound ? GetAdjustedTime() : GetTime()); - CAddress addrYou = (fUseProxy ? CAddress("0.0.0.0") : addr); - CAddress addrMe = (fUseProxy ? CAddress("0.0.0.0") : addrLocalHost); + CAddress addrYou = (fUseProxy ? CAddress(CService("0.0.0.0",0)) : addr); + CAddress addrMe = (fUseProxy ? CAddress(CService("0.0.0.0",0)) : addrLocalHost); RAND_bytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce)); PushMessage("version", PROTOCOL_VERSION, nLocalServices, nTime, addrYou, addrMe, nLocalHostNonce, FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector()), nBestHeight); @@ -1204,7 +1204,7 @@ void ThreadOpenConnections2(void* parg) { BOOST_FOREACH(string strAddr, mapMultiArgs["-connect"]) { - CAddress addr(strAddr, fAllowDNS); + CAddress addr(CService(strAddr, GetDefaultPort(), fAllowDNS)); if (addr.IsValid()) OpenNetworkConnection(addr); for (int i = 0; i < 10 && i < nLoop; i++)