aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r--src/netbase.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 37e1df9138..d5b75d6afd 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
+// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -171,7 +171,7 @@ bool LookupNumeric(const char *pszName, CService& addr, int portDefault)
bool static Socks4(const CService &addrDest, SOCKET& hSocket)
{
- LogPrintf("SOCKS4 connecting %s\n", addrDest.ToString().c_str());
+ LogPrintf("SOCKS4 connecting %s\n", addrDest.ToString());
if (!addrDest.IsIPv4())
{
closesocket(hSocket);
@@ -209,13 +209,13 @@ bool static Socks4(const CService &addrDest, SOCKET& hSocket)
LogPrintf("ERROR: Proxy returned error %d\n", pchRet[1]);
return false;
}
- LogPrintf("SOCKS4 connected %s\n", addrDest.ToString().c_str());
+ LogPrintf("SOCKS4 connected %s\n", addrDest.ToString());
return true;
}
bool static Socks5(string strDest, int port, SOCKET& hSocket)
{
- LogPrintf("SOCKS5 connecting %s\n", strDest.c_str());
+ LogPrintf("SOCKS5 connecting %s\n", strDest);
if (strDest.size() > 255)
{
closesocket(hSocket);
@@ -311,7 +311,7 @@ bool static Socks5(string strDest, int port, SOCKET& hSocket)
closesocket(hSocket);
return error("Error reading from proxy");
}
- LogPrintf("SOCKS5 connected %s\n", strDest.c_str());
+ LogPrintf("SOCKS5 connected %s\n", strDest);
return true;
}
@@ -326,7 +326,7 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
#endif
socklen_t len = sizeof(sockaddr);
if (!addrConnect.GetSockAddr((struct sockaddr*)&sockaddr, &len)) {
- LogPrintf("Cannot connect to %s: unsupported network\n", addrConnect.ToString().c_str());
+ LogPrintf("Cannot connect to %s: unsupported network\n", addrConnect.ToString());
return false;
}
@@ -365,13 +365,13 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
int nRet = select(hSocket + 1, NULL, &fdset, NULL, &timeout);
if (nRet == 0)
{
- LogPrint("net", "connection to %s timeout\n", addrConnect.ToString().c_str());
+ LogPrint("net", "connection to %s timeout\n", addrConnect.ToString());
closesocket(hSocket);
return false;
}
if (nRet == SOCKET_ERROR)
{
- LogPrintf("select() for %s failed: %i\n", addrConnect.ToString().c_str(), WSAGetLastError());
+ LogPrintf("select() for %s failed: %i\n", addrConnect.ToString(), WSAGetLastError());
closesocket(hSocket);
return false;
}
@@ -382,13 +382,13 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
if (getsockopt(hSocket, SOL_SOCKET, SO_ERROR, &nRet, &nRetSize) == SOCKET_ERROR)
#endif
{
- LogPrintf("getsockopt() for %s failed: %i\n", addrConnect.ToString().c_str(), WSAGetLastError());
+ LogPrintf("getsockopt() for %s failed: %i\n", addrConnect.ToString(), WSAGetLastError());
closesocket(hSocket);
return false;
}
if (nRet != 0)
{
- LogPrintf("connect() to %s failed after select(): %s\n", addrConnect.ToString().c_str(), strerror(nRet));
+ LogPrintf("connect() to %s failed after select(): %s\n", addrConnect.ToString(), strerror(nRet));
closesocket(hSocket);
return false;
}
@@ -399,7 +399,7 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
else
#endif
{
- LogPrintf("connect() to %s failed: %i\n", addrConnect.ToString().c_str(), WSAGetLastError());
+ LogPrintf("connect() to %s failed: %i\n", addrConnect.ToString(), WSAGetLastError());
closesocket(hSocket);
return false;
}
@@ -895,7 +895,7 @@ uint64_t CNetAddr::GetHash() const
void CNetAddr::print() const
{
- LogPrintf("CNetAddr(%s)\n", ToString().c_str());
+ LogPrintf("CNetAddr(%s)\n", ToString());
}
// private extensions to enum Network, only returned by GetExtNetwork,
@@ -1136,7 +1136,7 @@ std::string CService::ToString() const
void CService::print() const
{
- LogPrintf("CService(%s)\n", ToString().c_str());
+ LogPrintf("CService(%s)\n", ToString());
}
void CService::SetPort(unsigned short portIn)