diff options
Diffstat (limited to 'linden/indra/llmessage/net.cpp')
-rw-r--r-- | linden/indra/llmessage/net.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/linden/indra/llmessage/net.cpp b/linden/indra/llmessage/net.cpp index de19ef8..c61f4a2 100644 --- a/linden/indra/llmessage/net.cpp +++ b/linden/indra/llmessage/net.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2000-2007, Linden Research, Inc. | 5 | * Copyright (c) 2000-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -241,6 +242,12 @@ S32 start_net(S32& socket_out, int& nPort) | |||
241 | return 4; | 242 | return 4; |
242 | } | 243 | } |
243 | } | 244 | } |
245 | |||
246 | sockaddr_in socket_address; | ||
247 | S32 socket_address_size = sizeof(socket_address); | ||
248 | getsockname(hSocket, (SOCKADDR*) &socket_address, &socket_address_size); | ||
249 | attempt_port = ntohs(socket_address.sin_port); | ||
250 | |||
244 | llinfos << "connected on port " << attempt_port << llendl; | 251 | llinfos << "connected on port " << attempt_port << llendl; |
245 | nPort = attempt_port; | 252 | nPort = attempt_port; |
246 | 253 | ||