[Libreoffice-commits] .: vcl/unx

Michael Meeks mmeeks at kemper.freedesktop.org
Tue Feb 22 04:07:04 PST 2011


 vcl/unx/inc/saldata.hxx        |    3 +--
 vcl/unx/source/app/saldata.cxx |    8 +++++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 629bf06c491ea556f65f935b113532fb5c37c058
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Tue Feb 22 12:05:55 2011 +0000

    fix fdo#32640 - un-necessary reverse lookup on startup

diff --git a/vcl/unx/inc/saldata.hxx b/vcl/unx/inc/saldata.hxx
index 27f8cc1..0dee172 100644
--- a/vcl/unx/inc/saldata.hxx
+++ b/vcl/unx/inc/saldata.hxx
@@ -86,8 +86,7 @@ public:
     inline	void			StopTimer();
     void					Timeout() const;
 
-    const rtl::OUString&    GetLocalHostName() const
-    { return maLocalHostName; }
+    const rtl::OUString&    GetLocalHostName();
 
     static int XErrorHdl( Display*, XErrorEvent* );
     static int XIOErrorHdl( Display* );
diff --git a/vcl/unx/source/app/saldata.cxx b/vcl/unx/source/app/saldata.cxx
index c7c5970..a90d9be 100644
--- a/vcl/unx/source/app/saldata.cxx
+++ b/vcl/unx/source/app/saldata.cxx
@@ -272,7 +272,13 @@ X11SalData::X11SalData()
     m_pPlugin		= NULL;
 
     hMainThread_	= pthread_self();
-    osl_getLocalHostname( &maLocalHostName.pData );
+}
+
+const rtl::OUString& X11SalData::GetLocalHostName()
+{
+    if (!maLocalHostName.getLength())
+            osl_getLocalHostname( &maLocalHostName.pData );
+    return maLocalHostName;
 }
 
 X11SalData::~X11SalData()


More information about the Libreoffice-commits mailing list