diff options
author | Jacek Antonelli | 2008-08-15 23:44:59 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:59 -0500 |
commit | a408bac29378072fbf36864164149458c978cfcc (patch) | |
tree | 67feccf1a5d3816611ba48d6762f86f0f7f4b1f6 /linden/indra/llmessage/net.cpp | |
parent | Second Life viewer sources 1.17.0.12 (diff) | |
download | meta-impy-a408bac29378072fbf36864164149458c978cfcc.zip meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.gz meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.bz2 meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.xz |
Second Life viewer sources 1.17.1.0
Diffstat (limited to 'linden/indra/llmessage/net.cpp')
-rw-r--r-- | linden/indra/llmessage/net.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/linden/indra/llmessage/net.cpp b/linden/indra/llmessage/net.cpp index c61f4a2..1395093 100644 --- a/linden/indra/llmessage/net.cpp +++ b/linden/indra/llmessage/net.cpp | |||
@@ -289,8 +289,12 @@ S32 start_net(S32& socket_out, int& nPort) | |||
289 | return 0; | 289 | return 0; |
290 | } | 290 | } |
291 | 291 | ||
292 | void end_net() | 292 | void end_net(S32& socket_out) |
293 | { | 293 | { |
294 | if (socket_out < 0) | ||
295 | { | ||
296 | closesocket(socket_out); | ||
297 | } | ||
294 | WSACleanup(); | 298 | WSACleanup(); |
295 | } | 299 | } |
296 | 300 | ||
@@ -457,8 +461,12 @@ S32 start_net(S32& socket_out, int& nPort) | |||
457 | return 0; | 461 | return 0; |
458 | } | 462 | } |
459 | 463 | ||
460 | void end_net() | 464 | void end_net(S32& socket_out) |
461 | { | 465 | { |
466 | if (socket_out < 0) | ||
467 | { | ||
468 | close(socket_out); | ||
469 | } | ||
462 | } | 470 | } |
463 | 471 | ||
464 | int receive_packet(int hSocket, char * receiveBuffer) | 472 | int receive_packet(int hSocket, char * receiveBuffer) |