diff options
Diffstat (limited to 'linden/indra/llmessage/llhost.cpp')
-rw-r--r-- | linden/indra/llmessage/llhost.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/linden/indra/llmessage/llhost.cpp b/linden/indra/llmessage/llhost.cpp index c1ca4b0..50ef301 100644 --- a/linden/indra/llmessage/llhost.cpp +++ b/linden/indra/llmessage/llhost.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 |
@@ -47,7 +48,7 @@ LLHost LLHost::invalid(INVALID_PORT,INVALID_HOST_IP_ADDRESS); | |||
47 | LLHost::LLHost(const std::string& ip_and_port) | 48 | LLHost::LLHost(const std::string& ip_and_port) |
48 | { | 49 | { |
49 | std::string::size_type colon_index = ip_and_port.find(":"); | 50 | std::string::size_type colon_index = ip_and_port.find(":"); |
50 | if (colon_index != std::string::npos) | 51 | if (colon_index == std::string::npos) |
51 | { | 52 | { |
52 | mIP = ip_string_to_u32(ip_and_port.c_str()); | 53 | mIP = ip_string_to_u32(ip_and_port.c_str()); |
53 | mPort = 0; | 54 | mPort = 0; |
@@ -70,7 +71,7 @@ void LLHost::getString(char* buffer, S32 length) const | |||
70 | return; | 71 | return; |
71 | } | 72 | } |
72 | 73 | ||
73 | snprintf(buffer, length, "%s:%u", u32_to_ip_string(mIP), mPort); /*Flawfinder: ignore*/ | 74 | snprintf(buffer, length, "%s:%u", u32_to_ip_string(mIP), mPort); /* Flawfinder: ignore */ |
74 | } | 75 | } |
75 | 76 | ||
76 | void LLHost::getIPString(char* buffer, S32 length) const | 77 | void LLHost::getIPString(char* buffer, S32 length) const |
@@ -81,7 +82,7 @@ void LLHost::getIPString(char* buffer, S32 length) const | |||
81 | return; | 82 | return; |
82 | } | 83 | } |
83 | 84 | ||
84 | snprintf(buffer, length, "%s", u32_to_ip_string(mIP)); /*Flawfinder: ignore*/ | 85 | snprintf(buffer, length, "%s", u32_to_ip_string(mIP)); /* Flawfinder: ignore */ |
85 | } | 86 | } |
86 | 87 | ||
87 | 88 | ||