From 0a9135e3444bbefde6188f456b9c9772a816096d Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 18 Sep 2013 15:17:14 +0000
Subject: [PATCH] OPENDJ-1116 Introduce abstraction for the changelog DB

---
 opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java b/opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java
index b21a06b..ac7c6a7 100644
--- a/opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java
+++ b/opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java
@@ -84,7 +84,8 @@
       serverURL = inReplServerStartMsg.getServerURL();
       final String port = serverURL.substring(serverURL.lastIndexOf(':') + 1);
       serverAddressURL = session.getRemoteAddress() + ":" + port;
-      setBaseDNAndDomain(inReplServerStartMsg.getBaseDn(), false);
+      DN baseDN = DN.decode(inReplServerStartMsg.getBaseDn());
+      setBaseDNAndDomain(baseDN, false);
       setInitialServerState(inReplServerStartMsg.getServerState());
       setSendWindowSize(inReplServerStartMsg.getWindowSize());
       if (protocolVersion > ProtocolVersion.REPLICATION_PROTOCOL_V1)
@@ -141,8 +142,8 @@
    * @param sslEncryption The sslEncryption requested to the remote RS.
    * @throws DirectoryException when an error occurs.
    */
-  public void connect(String baseDN, boolean sslEncryption)
-  throws DirectoryException
+  public void connect(DN baseDN, boolean sslEncryption)
+      throws DirectoryException
   {
     // we are the initiator and decides of the encryption
     this.sslEncryption = sslEncryption;
@@ -245,7 +246,7 @@
 
       Message message = INFO_REPLICATION_SERVER_CONNECTION_TO_RS
           .get(getReplicationServerId(), getServerId(),
-              replicationServerDomain.getBaseDn(),
+              replicationServerDomain.getBaseDN().toNormalizedString(),
               session.getReadableRemoteAddress());
       logError(message);
 
@@ -380,7 +381,7 @@
 
       Message message = INFO_REPLICATION_SERVER_CONNECTION_FROM_RS
           .get(getReplicationServerId(), getServerId(),
-              replicationServerDomain.getBaseDn(),
+              replicationServerDomain.getBaseDN().toNormalizedString(),
               session.getReadableRemoteAddress());
       logError(message);
 
@@ -719,7 +720,7 @@
     if (serverId != 0)
     {
       return "Replication server RS(" + serverId + ") for domain \""
-          + replicationServerDomain.getBaseDn() + "\"";
+          + replicationServerDomain.getBaseDN() + "\"";
     }
     return "Unknown server";
   }
@@ -757,4 +758,5 @@
     if (replicationServerDomain != null)
       replicationServerDomain.receiveTopoInfoFromRS(topoMsg, this, true);
   }
+
 }

--
Gitblit v1.10.0