From 446b7ecea2e1635bd66087894f23e3a45eb7b607 Mon Sep 17 00:00:00 2001 From: Aaron Brashears Date: Fri, 8 Feb 2008 23:43:16 +0000 Subject: Result of svn merge -r79554:79558 svn+ssh://svn/svn/linden/branches/merge-dp into release --- indra/llmessage/llhost.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'indra/llmessage/llhost.cpp') diff --git a/indra/llmessage/llhost.cpp b/indra/llmessage/llhost.cpp index b73becfa71..4d10f06051 100644 --- a/indra/llmessage/llhost.cpp +++ b/indra/llmessage/llhost.cpp @@ -132,14 +132,13 @@ void LLHost::getHostName(char *buf, S32 len) const } } -LLString LLHost::getHostName() const +std::string LLHost::getHostName() const { - hostent *he; - + hostent* he; if (INVALID_HOST_IP_ADDRESS == mIP) { llwarns << "LLHost::getHostName() : Invalid IP address" << llendl; - return ""; + return std::string(); } he = gethostbyaddr((char *)&mIP, sizeof(mIP), AF_INET); if (!he) @@ -151,12 +150,11 @@ LLString LLHost::getHostName() const llwarns << "LLHost::getHostName() : Couldn't find host name for address " << mIP << ", Error: " << h_errno << llendl; #endif - return ""; + return std::string(); } else { - LLString hostname = he->h_name; - return hostname; + return ll_safe_string(he->h_name); } } -- cgit v1.2.3