No longer include llerrorlegacy.h. Updated llstl to include deletion utilites.

This commit is contained in:
Shyotl
2015-06-19 03:54:20 -05:00
parent 283f5298d5
commit 1c627317ec
634 changed files with 8200 additions and 12214 deletions

View File

@@ -175,7 +175,7 @@ U32 ip_string_to_u32(const char* ip_string)
if (ip == INADDR_NONE
&& strncmp(ip_string, BROADCAST_ADDRESS_STRING, MAXADDRSTR) != 0)
{
llwarns << "ip_string_to_u32() failed, Error: Invalid IP string '" << ip_string << "'" << llendl;
LL_WARNS() << "ip_string_to_u32() failed, Error: Invalid IP string '" << ip_string << "'" << LL_ENDL;
return INVALID_HOST_IP_ADDRESS;
}
return ip;
@@ -334,7 +334,7 @@ S32 receive_packet(int hSocket, char * receiveBuffer)
return 0;
if (WSAECONNRESET == WSAGetLastError())
return 0;
llinfos << "receivePacket() failed, Error: " << WSAGetLastError() << llendl;
LL_INFOS() << "receivePacket() failed, Error: " << WSAGetLastError() << LL_ENDL;
}
return nRet;
@@ -368,7 +368,7 @@ BOOL send_packet(int hSocket, const char *sendBuffer, int size, U32 recipient, i
{
return TRUE;
}
llinfos << "sendto() failed to " << u32_to_ip_string(recipient) << ":" << nPort
LL_INFOS() << "sendto() failed to " << u32_to_ip_string(recipient) << ":" << nPort
<< ", Error " << last_error << LL_ENDL;
}
}
@@ -397,7 +397,7 @@ S32 start_net(S32& socket_out, int& nPort)
hSocket = socket(AF_INET, SOCK_DGRAM, 0);
if (hSocket < 0)
{
llwarns << "socket() failed" << llendl;
LL_WARNS() << "socket() failed" << LL_ENDL;
return 1;
}
@@ -408,11 +408,11 @@ S32 start_net(S32& socket_out, int& nPort)
stLclAddr.sin_family = AF_INET;
stLclAddr.sin_addr.s_addr = htonl(INADDR_ANY);
stLclAddr.sin_port = htons(0);
llinfos << "attempting to connect on OS assigned port" << llendl;
LL_INFOS() << "attempting to connect on OS assigned port" << LL_ENDL;
nRet = bind(hSocket, (struct sockaddr*) &stLclAddr, sizeof(stLclAddr));
if (nRet < 0)
{
llwarns << "Failed to bind on an OS assigned port error: "
LL_WARNS() << "Failed to bind on an OS assigned port error: "
<< nRet << LL_ENDL;
}
else
@@ -420,9 +420,9 @@ S32 start_net(S32& socket_out, int& nPort)
sockaddr_in socket_info;
socklen_t len = sizeof(sockaddr_in);
int err = getsockname(hSocket, (sockaddr*)&socket_info, &len);
llinfos << "Get socket returned: " << err << " length " << len << llendl;
LL_INFOS() << "Get socket returned: " << err << " length " << len << LL_ENDL;
nPort = ntohs(socket_info.sin_port);
llinfos << "Assigned port: " << nPort << llendl;
LL_INFOS() << "Assigned port: " << nPort << LL_ENDL;
}
}
@@ -433,7 +433,7 @@ S32 start_net(S32& socket_out, int& nPort)
stLclAddr.sin_addr.s_addr = htonl(INADDR_ANY);
stLclAddr.sin_port = htons(nPort);
U32 attempt_port = nPort;
llinfos << "attempting to connect on port " << attempt_port << llendl;
LL_INFOS() << "attempting to connect on port " << attempt_port << LL_ENDL;
nRet = bind(hSocket, (struct sockaddr*) &stLclAddr, sizeof(stLclAddr));
if (nRet < 0)
@@ -447,7 +447,7 @@ S32 start_net(S32& socket_out, int& nPort)
attempt_port++)
{
stLclAddr.sin_port = htons(attempt_port);
llinfos << "trying port " << attempt_port << llendl;
LL_INFOS() << "trying port " << attempt_port << LL_ENDL;
nRet = bind(hSocket, (struct sockaddr*) &stLclAddr, sizeof(stLclAddr));
if (!((nRet < 0) && (errno == EADDRINUSE)))
{
@@ -456,7 +456,7 @@ S32 start_net(S32& socket_out, int& nPort)
}
if (nRet < 0)
{
llwarns << "startNet() : Couldn't find available network port." << llendl;
LL_WARNS() << "startNet() : Couldn't find available network port." << LL_ENDL;
// Fail gracefully in release.
return 3;
}
@@ -464,12 +464,12 @@ S32 start_net(S32& socket_out, int& nPort)
// Some other socket error
else
{
llwarns << llformat ("bind() port: %d failed, Err: %s\n", nPort, strerror(errno)) << llendl;
LL_WARNS() << llformat ("bind() port: %d failed, Err: %s\n", nPort, strerror(errno)) << LL_ENDL;
// Fail gracefully in release.
return 4;
}
}
llinfos << "connected on port " << attempt_port << llendl;
LL_INFOS() << "connected on port " << attempt_port << LL_ENDL;
nPort = attempt_port;
}
// Set socket to be non-blocking
@@ -478,18 +478,18 @@ S32 start_net(S32& socket_out, int& nPort)
nRet = setsockopt(hSocket, SOL_SOCKET, SO_RCVBUF, (char *)&rec_size, buff_size);
if (nRet)
{
llinfos << "Can't set receive size!" << llendl;
LL_INFOS() << "Can't set receive size!" << LL_ENDL;
}
nRet = setsockopt(hSocket, SOL_SOCKET, SO_SNDBUF, (char *)&snd_size, buff_size);
if (nRet)
{
llinfos << "Can't set send size!" << llendl;
LL_INFOS() << "Can't set send size!" << LL_ENDL;
}
getsockopt(hSocket, SOL_SOCKET, SO_RCVBUF, (char *)&rec_size, &buff_size);
getsockopt(hSocket, SOL_SOCKET, SO_SNDBUF, (char *)&snd_size, &buff_size);
llinfos << "startNet - receive buffer size : " << rec_size << llendl;
llinfos << "startNet - send buffer size : " << snd_size << llendl;
LL_INFOS() << "startNet - receive buffer size : " << rec_size << LL_ENDL;
LL_INFOS() << "startNet - send buffer size : " << snd_size << LL_ENDL;
#if LL_LINUX
// Turn on recipient address tracking
@@ -497,11 +497,11 @@ S32 start_net(S32& socket_out, int& nPort)
int use_pktinfo = 1;
if( setsockopt( hSocket, SOL_IP, IP_PKTINFO, &use_pktinfo, sizeof(use_pktinfo) ) == -1 )
{
llwarns << "No IP_PKTINFO available" << llendl;
LL_WARNS() << "No IP_PKTINFO available" << LL_ENDL;
}
else
{
llinfos << "IP_PKKTINFO enabled" << llendl;
LL_INFOS() << "IP_PKKTINFO enabled" << LL_ENDL;
}
}
#endif
@@ -629,22 +629,22 @@ BOOL send_packet(int hSocket, const char * sendBuffer, int size, U32 recipient,
if (errno == EAGAIN)
{
// say nothing, just repeat send
llinfos << "sendto() reported buffer full, resending (attempt " << send_attempts << ")" << llendl;
llinfos << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << llendl;
LL_INFOS() << "sendto() reported buffer full, resending (attempt " << send_attempts << ")" << LL_ENDL;
LL_INFOS() << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << LL_ENDL;
resend = TRUE;
}
else if (errno == ECONNREFUSED)
{
// response to ICMP connection refused message on earlier send
llinfos << "sendto() reported connection refused, resending (attempt " << send_attempts << ")" << llendl;
llinfos << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << llendl;
LL_INFOS() << "sendto() reported connection refused, resending (attempt " << send_attempts << ")" << LL_ENDL;
LL_INFOS() << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << LL_ENDL;
resend = TRUE;
}
else
{
// some other error
llinfos << "sendto() failed: " << errno << ", " << strerror(errno) << llendl;
llinfos << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << llendl;
LL_INFOS() << "sendto() failed: " << errno << ", " << strerror(errno) << LL_ENDL;
LL_INFOS() << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << LL_ENDL;
resend = FALSE;
}
}
@@ -653,7 +653,7 @@ BOOL send_packet(int hSocket, const char * sendBuffer, int size, U32 recipient,
if (send_attempts >= 3)
{
llinfos << "sendPacket() bailed out of send!" << llendl;
LL_INFOS() << "sendPacket() bailed out of send!" << LL_ENDL;
return FALSE;
}