X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fnetbase.cpp;h=4699abf975be4ddb9e01cb0337c22e078c34a473;hb=15e9a03687e99d6b1a7a90e56e69a37faa6bb9b8;hp=41dec48d7324a8791a54b04ecbeb2fd013cb4bee;hpb=5ae858b9cb5aa7815773fb067e5e1a7ffa07119e;p=novacoin.git diff --git a/src/netbase.cpp b/src/netbase.cpp index 41dec48..4699abf 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -136,11 +136,6 @@ bool LookupHost(const char *pszName, std::vector& vIP, unsigned int nM return LookupIntern(strHost.c_str(), vIP, nMaxSolutions, fAllowLookup); } -bool LookupHostNumeric(const char *pszName, std::vector& vIP, unsigned int nMaxSolutions) -{ - return LookupHost(pszName, vIP, nMaxSolutions, false); -} - bool Lookup(const char *pszName, std::vector& vAddr, uint16_t portDefault, bool fAllowLookup, unsigned int nMaxSolutions) { if (pszName[0] == 0) @@ -226,11 +221,9 @@ bool static Socks5(string strDest, uint16_t port, SOCKET& hSocket) CloseSocket(hSocket); return error("Hostname too long"); } - char pszSocks5Init[] = "\5\1\0"; - ssize_t nSize = sizeof(pszSocks5Init) - 1; - - ssize_t ret = send(hSocket, pszSocks5Init, nSize, MSG_NOSIGNAL); - if (ret != nSize) + const char pszSocks5Init[] = "\5\1\0"; + ssize_t ret = send(hSocket, pszSocks5Init, 3, MSG_NOSIGNAL); + if (ret != 3) { CloseSocket(hSocket); return error("Error sending to proxy"); @@ -1198,4 +1191,4 @@ bool CloseSocket(SOCKET& hSocket) #endif hSocket = INVALID_SOCKET; return ret != SOCKET_ERROR; -} \ No newline at end of file +}