From a091e85ec925fdb878303144f7b4f5e302e7c35f Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Fri, 21 Sep 2007 17:31:33 +0000
Subject: [PATCH] Fix for issues 2314 and 2238.

---
 opends/src/guitools/org/opends/guitools/statuspanel/ServerStatusDescriptor.java |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/opends/src/guitools/org/opends/guitools/statuspanel/ServerStatusDescriptor.java b/opends/src/guitools/org/opends/guitools/statuspanel/ServerStatusDescriptor.java
index f86a4b7..8712493 100644
--- a/opends/src/guitools/org/opends/guitools/statuspanel/ServerStatusDescriptor.java
+++ b/opends/src/guitools/org/opends/guitools/statuspanel/ServerStatusDescriptor.java
@@ -49,6 +49,18 @@
   private Message errorMsg;
   private boolean isAuthenticated;
 
+  private static String hostName = "locahost";
+  static
+  {
+    try
+    {
+      hostName = java.net.InetAddress.getLocalHost().getHostName();
+    }
+    catch (Throwable t)
+    {
+    }
+  };
+
   /**
    * Enumeration indicating the status of the server.
    *
@@ -359,4 +371,13 @@
   {
     this.listeners = listeners;
   }
+
+  /**
+   * Returns the host name of the server.
+   * @return the host name of the server.
+   */
+  public String getHostname()
+  {
+    return hostName;
+  }
 }

--
Gitblit v1.10.0