@ -430,7 +430,7 @@ static CAddress GetBindAddress(SOCKET sock)
if ( ! getsockname ( sock , ( struct sockaddr * ) & sockaddr_bind , & sockaddr_bind_len ) ) {
addr_bind . SetSockAddr ( ( const struct sockaddr * ) & sockaddr_bind ) ;
} else {
LogPrintLevel ( BCLog : : Level: : Warning , BCLog : : NET , " getsockname failed \n " ) ;
LogPrintLevel ( BCLog : : NET, BCLog : : Level: : Warning , " getsockname failed \n " ) ;
}
}
return addr_bind ;
@ -454,7 +454,7 @@ CNode* CConnman::ConnectNode(CAddress addrConnect, const char *pszDest, bool fCo
}
/// debug print
LogPrintLevel ( BCLog : : Level: : Debug , BCLog : : NET , " trying connection %s lastseen=%.1fhrs \n " ,
LogPrintLevel ( BCLog : : NET, BCLog : : Level : : Debug , " trying connection %s lastseen=%.1fhrs \n " ,
pszDest ? pszDest : addrConnect . ToString ( ) ,
pszDest ? 0.0 : ( double ) ( GetAdjustedTime ( ) - addrConnect . nTime ) / 3600.0 ) ;
@ -1140,7 +1140,7 @@ void CConnman::AcceptConnection(const ListenSocket& hListenSocket) {
}
if ( ! addr . SetSockAddr ( ( const struct sockaddr * ) & sockaddr ) ) {
LogPrintLevel ( BCLog : : Level: : Warning , BCLog : : NET , " Unknown socket family \n " ) ;
LogPrintLevel ( BCLog : : NET, BCLog : : Level: : Warning , " Unknown socket family \n " ) ;
} else {
addr = CAddress { MaybeFlipIPv6toCJDNS ( addr ) , NODE_NONE } ;
}
@ -2398,14 +2398,14 @@ bool CConnman::BindListenPort(const CService& addrBind, bilingual_str& strError,
if ( ! addrBind . GetSockAddr ( ( struct sockaddr * ) & sockaddr , & len ) )
{
strError = strprintf ( Untranslated ( " Bind address family for %s not supported " ) , addrBind . ToString ( ) ) ;
LogPrintLevel ( BCLog : : Level: : Error , BCLog : : NET , " %s \n " , strError . original ) ;
LogPrintLevel ( BCLog : : NET, BCLog : : Level : : Error , " %s \n " , strError . original ) ;
return false ;
}
std : : unique_ptr < Sock > sock = CreateSock ( addrBind ) ;
if ( ! sock ) {
strError = strprintf ( Untranslated ( " Couldn't open socket for incoming connections (socket returned error %s) " ) , NetworkErrorString ( WSAGetLastError ( ) ) ) ;
LogPrintLevel ( BCLog : : Level: : Error , BCLog : : NET , " %s \n " , strError . original ) ;
LogPrintLevel ( BCLog : : NET, BCLog : : Level : : Error , " %s \n " , strError . original ) ;
return false ;
}
@ -2441,7 +2441,7 @@ bool CConnman::BindListenPort(const CService& addrBind, bilingual_str& strError,
strError = strprintf ( _ ( " Unable to bind to %s on this computer. %s is probably already running. " ) , addrBind . ToString ( ) , PACKAGE_NAME ) ;
else
strError = strprintf ( _ ( " Unable to bind to %s on this computer (bind returned error %s) " ) , addrBind . ToString ( ) , NetworkErrorString ( nErr ) ) ;
LogPrintLevel ( BCLog : : Level: : Error , BCLog : : NET , " %s \n " , strError . original ) ;
LogPrintLevel ( BCLog : : NET, BCLog : : Level : : Error , " %s \n " , strError . original ) ;
return false ;
}
LogPrintf ( " Bound to %s \n " , addrBind . ToString ( ) ) ;
@ -2450,7 +2450,7 @@ bool CConnman::BindListenPort(const CService& addrBind, bilingual_str& strError,
if ( listen ( sock - > Get ( ) , SOMAXCONN ) = = SOCKET_ERROR )
{
strError = strprintf ( _ ( " Listening for incoming connections failed (listen returned error %s) " ) , NetworkErrorString ( WSAGetLastError ( ) ) ) ;
LogPrintLevel ( BCLog : : Level: : Error , BCLog : : NET , " %s \n " , strError . original ) ;
LogPrintLevel ( BCLog : : NET, BCLog : : Level : : Error , " %s \n " , strError . original ) ;
return false ;
}