mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
23.52.2009 63f1bcbd0af8b192232030ffd49bf9dc0a89c8a0
Fix for issue 4364 (control-panel occasionally freezes Ubuntu 9.10).

Use the same fix as for issue 4328 (Control Panel not usable in Ubuntu):
Use InetAddress.getHostAddress() instead of InetAddress.getCanonicalHostName().
3 files modified
36 ■■■■ changed files
opends/src/guitools/org/opends/guitools/controlpanel/datamodel/ConnectionHandlersMonitoringTableModel.java 7 ●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/controlpanel/datamodel/ServerDescriptor.java 13 ●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/controlpanel/task/Task.java 16 ●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/controlpanel/datamodel/ConnectionHandlersMonitoringTableModel.java
@@ -163,7 +163,7 @@
    {
      if (ach.getAddress() != null)
      {
        sb.append(ach.getAddress().getHostName()+":"+ch.getPort());
        sb.append(ach.getAddress().getHostAddress()+":"+ch.getPort());
      }
      else
      {
@@ -201,10 +201,7 @@
        {
          if (cn.endsWith(
              " "+address.getHostAddress()+" port "+cch.getPort()+
              " Statistics") ||
              cn.endsWith(
                  " "+address.getHostName()+" port "+cch.getPort()+
                  " Statistics"))
              " Statistics"))
          {
            monitoringEntry = sr;
            break;
opends/src/guitools/org/opends/guitools/controlpanel/datamodel/ServerDescriptor.java
@@ -41,6 +41,7 @@
import org.opends.guitools.controlpanel.util.ConfigFromDirContext;
import org.opends.guitools.controlpanel.util.Utilities;
import org.opends.quicksetup.UserData;
import org.opends.server.tools.tasks.TaskEntry;
import org.opends.server.types.AttributeType;
import org.opends.server.types.DN;
@@ -88,17 +89,7 @@
  private boolean isAuthenticated;
  private static String localHostName = "locahost";
  static
  {
    try
    {
      localHostName = java.net.InetAddress.getLocalHost().getHostName();
    }
    catch (Throwable t)
    {
    }
  };
  private static String localHostName = UserData.getDefaultHostName();
  private String hostName = localHostName;
opends/src/guitools/org/opends/guitools/controlpanel/task/Task.java
@@ -54,6 +54,7 @@
import org.opends.guitools.controlpanel.util.Utilities;
import org.opends.messages.Message;
import org.opends.quicksetup.Installation;
import org.opends.quicksetup.UserData;
import org.opends.server.types.ByteString;
import org.opends.server.types.DN;
import org.opends.server.types.Schema;
@@ -68,21 +69,8 @@
 */
public abstract class Task
{
  private static String localHostName = null;
  private static String localHostName = UserData.getDefaultHostName();
  private String binDir;
  static
  {
    // Do this since by default the hostname used by the connection is
    // 0.0.0.0, so try to figure the name of the host.  This is used to
    // display the equivalent command-line.
    try
    {
      localHostName = java.net.InetAddress.getLocalHost().getHostName();
    }
    catch (Throwable t)
    {
    }
  }
  /**
   * The different task types.
   *