From ca4513ac9832ea8a6a24c9fb87c6132ed050f5cd Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Thu, 05 Jul 2007 16:51:17 +0000
Subject: [PATCH] When installing update the Start TLS property on the registration information.  This way when we try to commit to a server using the standard LDAP port and startTLS is configured we will use it to connect.

---
 opends/src/ads/org/opends/admin/ads/util/ServerLoader.java |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/opends/src/ads/org/opends/admin/ads/util/ServerLoader.java b/opends/src/ads/org/opends/admin/ads/util/ServerLoader.java
index ba878b1..6a48647 100644
--- a/opends/src/ads/org/opends/admin/ads/util/ServerLoader.java
+++ b/opends/src/ads/org/opends/admin/ads/util/ServerLoader.java
@@ -114,10 +114,14 @@
     if (!isOver)
     {
       isInterrupted = true;
-      String ldapUrl = getLdapUrl(serverProperties);
+      String ldapUrl = getLdapsUrl(serverProperties);
       if (ldapUrl == null)
       {
-        ldapUrl = getLdapsUrl(serverProperties);
+        ldapUrl = getStartTlsLdapUrl(serverProperties);
+      }
+      if (ldapUrl == null)
+      {
+        ldapUrl = getLdapUrl(serverProperties);
       }
       lastException = new TopologyCacheException(
           TopologyCacheException.Type.TIMEOUT, null, trustManager, ldapUrl);
@@ -310,7 +314,7 @@
     "true".equalsIgnoreCase(v.toString());
     if (ldapEnabled && startTLSEnabled)
     {
-      ldapUrl = "ldaps://"+getHostNameForLdapUrl(serverProperties)+":"+
+      ldapUrl = "ldap://"+getHostNameForLdapUrl(serverProperties)+":"+
       serverProperties.get(ServerProperty.LDAP_PORT);
     }
     return ldapUrl;

--
Gitblit v1.10.0