mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
scripted-diff: LogPrintf -> LogInfo
This refactor does not change behavior. -BEGIN VERIFY SCRIPT- sed --in-place 's/\<LogPrintf\>/LogInfo/g' \ $( git grep -l '\<LogPrintf\>' -- ./contrib/ ./src/ ./test/ ':(exclude)src/logging.h' ) -END VERIFY SCRIPT-
This commit is contained in:
@@ -416,7 +416,7 @@ bool Socks5(const std::string& strDest, uint16_t port, const ProxyCredentials* a
|
||||
sock.SendComplete(vSocks5Init, g_socks5_recv_timeout, g_socks5_interrupt);
|
||||
uint8_t pchRet1[2];
|
||||
if (InterruptibleRecv(pchRet1, 2, g_socks5_recv_timeout, sock) != IntrRecvError::OK) {
|
||||
LogPrintf("Socks5() connect to %s:%d failed: InterruptibleRecv() timeout or other failure\n", strDest, port);
|
||||
LogInfo("Socks5() connect to %s:%d failed: InterruptibleRecv() timeout or other failure\n", strDest, port);
|
||||
return false;
|
||||
}
|
||||
if (pchRet1[0] != SOCKSVersion::SOCKS5) {
|
||||
@@ -543,7 +543,7 @@ std::unique_ptr<Sock> CreateSockOS(int domain, int type, int protocol)
|
||||
// Ensure that waiting for I/O on this socket won't result in undefined
|
||||
// behavior.
|
||||
if (!sock->IsSelectable()) {
|
||||
LogPrintf("Cannot create connection: non-selectable socket created (fd >= FD_SETSIZE ?)\n");
|
||||
LogInfo("Cannot create connection: non-selectable socket created (fd >= FD_SETSIZE ?)\n");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -552,14 +552,14 @@ std::unique_ptr<Sock> CreateSockOS(int domain, int type, int protocol)
|
||||
// Set the no-sigpipe option on the socket for BSD systems, other UNIXes
|
||||
// should use the MSG_NOSIGNAL flag for every send.
|
||||
if (sock->SetSockOpt(SOL_SOCKET, SO_NOSIGPIPE, &set, sizeof(int)) == SOCKET_ERROR) {
|
||||
LogPrintf("Error setting SO_NOSIGPIPE on socket: %s, continuing anyway\n",
|
||||
LogInfo("Error setting SO_NOSIGPIPE on socket: %s, continuing anyway\n",
|
||||
NetworkErrorString(WSAGetLastError()));
|
||||
}
|
||||
#endif
|
||||
|
||||
// Set the non-blocking option on the socket.
|
||||
if (!sock->SetNonBlocking()) {
|
||||
LogPrintf("Error setting socket to non-blocking: %s\n", NetworkErrorString(WSAGetLastError()));
|
||||
LogInfo("Error setting socket to non-blocking: %s\n", NetworkErrorString(WSAGetLastError()));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -585,7 +585,7 @@ static void LogConnectFailure(bool manual_connection, util::ConstevalFormatStrin
|
||||
{
|
||||
std::string error_message = tfm::format(fmt, args...);
|
||||
if (manual_connection) {
|
||||
LogPrintf("%s\n", error_message);
|
||||
LogInfo("%s\n", error_message);
|
||||
} else {
|
||||
LogDebug(BCLog::NET, "%s\n", error_message);
|
||||
}
|
||||
@@ -605,7 +605,7 @@ static bool ConnectToSocket(const Sock& sock, struct sockaddr* sockaddr, socklen
|
||||
const Sock::Event requested = Sock::RECV | Sock::SEND;
|
||||
Sock::Event occurred;
|
||||
if (!sock.Wait(std::chrono::milliseconds{nConnectTimeout}, requested, &occurred)) {
|
||||
LogPrintf("wait for connect to %s failed: %s\n",
|
||||
LogInfo("wait for connect to %s failed: %s\n",
|
||||
dest_str,
|
||||
NetworkErrorString(WSAGetLastError()));
|
||||
return false;
|
||||
@@ -622,7 +622,7 @@ static bool ConnectToSocket(const Sock& sock, struct sockaddr* sockaddr, socklen
|
||||
socklen_t sockerr_len = sizeof(sockerr);
|
||||
if (sock.GetSockOpt(SOL_SOCKET, SO_ERROR, &sockerr, &sockerr_len) ==
|
||||
SOCKET_ERROR) {
|
||||
LogPrintf("getsockopt() for %s failed: %s\n", dest_str, NetworkErrorString(WSAGetLastError()));
|
||||
LogInfo("getsockopt() for %s failed: %s\n", dest_str, NetworkErrorString(WSAGetLastError()));
|
||||
return false;
|
||||
}
|
||||
if (sockerr != 0) {
|
||||
@@ -658,7 +658,7 @@ std::unique_ptr<Sock> ConnectDirectly(const CService& dest, bool manual_connecti
|
||||
struct sockaddr_storage sockaddr;
|
||||
socklen_t len = sizeof(sockaddr);
|
||||
if (!dest.GetSockAddr((struct sockaddr*)&sockaddr, &len)) {
|
||||
LogPrintf("Cannot get sockaddr for %s: unsupported network\n", dest.ToStringAddrPort());
|
||||
LogInfo("Cannot get sockaddr for %s: unsupported network\n", dest.ToStringAddrPort());
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user