aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmessage/net.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:50 -0500
committerJacek Antonelli2008-08-15 23:45:50 -0500
commit2a4dea528f670b9bb1f77ef27a8a1dd16603d114 (patch)
tree95c68e362703c9099d571ecbdc6142b1cda1e005 /linden/indra/llmessage/net.cpp
parentSecond Life viewer sources 1.20.6 (diff)
downloadmeta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.zip
meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.gz
meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.bz2
meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.xz
Second Life viewer sources 1.20.7
Diffstat (limited to 'linden/indra/llmessage/net.cpp')
-rw-r--r--linden/indra/llmessage/net.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/linden/indra/llmessage/net.cpp b/linden/indra/llmessage/net.cpp
index 40c19a7..aa095a1 100644
--- a/linden/indra/llmessage/net.cpp
+++ b/linden/indra/llmessage/net.cpp
@@ -185,7 +185,7 @@ S32 start_net(S32& socket_out, int& nPort)
185 { 185 {
186 S32 err = WSAGetLastError(); 186 S32 err = WSAGetLastError();
187 WSACleanup(); 187 WSACleanup();
188 llwarns << "Windows Sockets initialization failed, err " << err << llendl; 188 LL_WARNS("AppInit") << "Windows Sockets initialization failed, err " << err << LL_ENDL;
189 return 1; 189 return 1;
190 } 190 }
191 191
@@ -195,7 +195,7 @@ S32 start_net(S32& socket_out, int& nPort)
195 { 195 {
196 S32 err = WSAGetLastError(); 196 S32 err = WSAGetLastError();
197 WSACleanup(); 197 WSACleanup();
198 llwarns << "socket() failed, err " << err << llendl; 198 LL_WARNS("AppInit") << "socket() failed, err " << err << LL_ENDL;
199 return 2; 199 return 2;
200 } 200 }
201 201
@@ -205,7 +205,7 @@ S32 start_net(S32& socket_out, int& nPort)
205 stLclAddr.sin_port = htons(nPort); 205 stLclAddr.sin_port = htons(nPort);
206 206
207 S32 attempt_port = nPort; 207 S32 attempt_port = nPort;
208 llinfos << "attempting to connect on port " << attempt_port << llendl; 208 LL_DEBUGS("AppInit") << "attempting to connect on port " << attempt_port << LL_ENDL;
209 nRet = bind(hSocket, (struct sockaddr*) &stLclAddr, sizeof(stLclAddr)); 209 nRet = bind(hSocket, (struct sockaddr*) &stLclAddr, sizeof(stLclAddr));
210 210
211 if (nRet == SOCKET_ERROR) 211 if (nRet == SOCKET_ERROR)
@@ -219,7 +219,7 @@ S32 start_net(S32& socket_out, int& nPort)
219 attempt_port++) 219 attempt_port++)
220 { 220 {
221 stLclAddr.sin_port = htons(attempt_port); 221 stLclAddr.sin_port = htons(attempt_port);
222 llinfos << "trying port " << attempt_port << llendl; 222 LL_DEBUGS("AppInit") << "trying port " << attempt_port << LL_ENDL;
223 nRet = bind(hSocket, (struct sockaddr*) &stLclAddr, sizeof(stLclAddr)); 223 nRet = bind(hSocket, (struct sockaddr*) &stLclAddr, sizeof(stLclAddr));
224 224
225 if (!(nRet == SOCKET_ERROR && 225 if (!(nRet == SOCKET_ERROR &&
@@ -231,7 +231,7 @@ S32 start_net(S32& socket_out, int& nPort)
231 231
232 if (nRet == SOCKET_ERROR) 232 if (nRet == SOCKET_ERROR)
233 { 233 {
234 llwarns << "startNet() : Couldn't find available network port." << llendl; 234 LL_WARNS("AppInit") << "startNet() : Couldn't find available network port." << LL_ENDL;
235 // Fail gracefully here in release 235 // Fail gracefully here in release
236 return 3; 236 return 3;
237 } 237 }
@@ -239,7 +239,7 @@ S32 start_net(S32& socket_out, int& nPort)
239 else 239 else
240 // Some other socket error 240 // Some other socket error
241 { 241 {
242 llwarns << llformat("bind() port: %d failed, Err: %d\n", nPort, WSAGetLastError()) << llendl; 242 LL_WARNS("AppInit") << llformat("bind() port: %d failed, Err: %d\n", nPort, WSAGetLastError()) << LL_ENDL;
243 // Fail gracefully in release. 243 // Fail gracefully in release.
244 return 4; 244 return 4;
245 } 245 }
@@ -250,7 +250,7 @@ S32 start_net(S32& socket_out, int& nPort)
250 getsockname(hSocket, (SOCKADDR*) &socket_address, &socket_address_size); 250 getsockname(hSocket, (SOCKADDR*) &socket_address, &socket_address_size);
251 attempt_port = ntohs(socket_address.sin_port); 251 attempt_port = ntohs(socket_address.sin_port);
252 252
253 llinfos << "connected on port " << attempt_port << llendl; 253 LL_INFOS("AppInit") << "connected on port " << attempt_port << LL_ENDL;
254 nPort = attempt_port; 254 nPort = attempt_port;
255 255
256 // Set socket to be non-blocking 256 // Set socket to be non-blocking
@@ -266,20 +266,20 @@ S32 start_net(S32& socket_out, int& nPort)
266 nRet = setsockopt(hSocket, SOL_SOCKET, SO_RCVBUF, (char *)&rec_size, buff_size); 266 nRet = setsockopt(hSocket, SOL_SOCKET, SO_RCVBUF, (char *)&rec_size, buff_size);
267 if (nRet) 267 if (nRet)
268 { 268 {
269 llinfos << "Can't set receive buffer size!" << llendl; 269 LL_INFOS("AppInit") << "Can't set receive buffer size!" << LL_ENDL;
270 } 270 }
271 271
272 nRet = setsockopt(hSocket, SOL_SOCKET, SO_SNDBUF, (char *)&snd_size, buff_size); 272 nRet = setsockopt(hSocket, SOL_SOCKET, SO_SNDBUF, (char *)&snd_size, buff_size);
273 if (nRet) 273 if (nRet)
274 { 274 {
275 llinfos << "Can't set send buffer size!" << llendl; 275 LL_INFOS("AppInit") << "Can't set send buffer size!" << LL_ENDL;
276 } 276 }
277 277
278 getsockopt(hSocket, SOL_SOCKET, SO_RCVBUF, (char *)&rec_size, &buff_size); 278 getsockopt(hSocket, SOL_SOCKET, SO_RCVBUF, (char *)&rec_size, &buff_size);
279 getsockopt(hSocket, SOL_SOCKET, SO_SNDBUF, (char *)&snd_size, &buff_size); 279 getsockopt(hSocket, SOL_SOCKET, SO_SNDBUF, (char *)&snd_size, &buff_size);
280 280
281 llinfos << "startNet - receive buffer size : " << rec_size << llendl; 281 LL_DEBUGS("AppInit") << "startNet - receive buffer size : " << rec_size << LL_ENDL;
282 llinfos << "startNet - send buffer size : " << snd_size << llendl; 282 LL_DEBUGS("AppInit") << "startNet - send buffer size : " << snd_size << LL_ENDL;
283 283
284 // Setup a destination address 284 // Setup a destination address
285 char achMCAddr[MAXADDRSTR] = " "; /* Flawfinder: ignore */ 285 char achMCAddr[MAXADDRSTR] = " "; /* Flawfinder: ignore */