diff options
Diffstat (limited to 'linden/indra/llmessage/llhost.cpp')
-rw-r--r-- | linden/indra/llmessage/llhost.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/linden/indra/llmessage/llhost.cpp b/linden/indra/llmessage/llhost.cpp index 57677b0..e139f6d 100644 --- a/linden/indra/llmessage/llhost.cpp +++ b/linden/indra/llmessage/llhost.cpp | |||
@@ -132,14 +132,13 @@ void LLHost::getHostName(char *buf, S32 len) const | |||
132 | } | 132 | } |
133 | } | 133 | } |
134 | 134 | ||
135 | LLString LLHost::getHostName() const | 135 | std::string LLHost::getHostName() const |
136 | { | 136 | { |
137 | hostent *he; | 137 | hostent* he; |
138 | |||
139 | if (INVALID_HOST_IP_ADDRESS == mIP) | 138 | if (INVALID_HOST_IP_ADDRESS == mIP) |
140 | { | 139 | { |
141 | llwarns << "LLHost::getHostName() : Invalid IP address" << llendl; | 140 | llwarns << "LLHost::getHostName() : Invalid IP address" << llendl; |
142 | return ""; | 141 | return std::string(); |
143 | } | 142 | } |
144 | he = gethostbyaddr((char *)&mIP, sizeof(mIP), AF_INET); | 143 | he = gethostbyaddr((char *)&mIP, sizeof(mIP), AF_INET); |
145 | if (!he) | 144 | if (!he) |
@@ -151,12 +150,11 @@ LLString LLHost::getHostName() const | |||
151 | llwarns << "LLHost::getHostName() : Couldn't find host name for address " << mIP << ", Error: " | 150 | llwarns << "LLHost::getHostName() : Couldn't find host name for address " << mIP << ", Error: " |
152 | << h_errno << llendl; | 151 | << h_errno << llendl; |
153 | #endif | 152 | #endif |
154 | return ""; | 153 | return std::string(); |
155 | } | 154 | } |
156 | else | 155 | else |
157 | { | 156 | { |
158 | LLString hostname = he->h_name; | 157 | return ll_safe_string(he->h_name); |
159 | return hostname; | ||
160 | } | 158 | } |
161 | } | 159 | } |
162 | 160 | ||