From 74023634617762408423a44c8dd01ee050fef584 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Mon, 03 Jun 2013 09:13:08 +0000
Subject: [PATCH] Fix OPENDJ-866 Local RS is named differently to remote RS under cn=replication,cn=monitor

---
 opends/src/server/org/opends/server/replication/protocol/ServerStartECLMsg.java |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/protocol/ServerStartECLMsg.java b/opends/src/server/org/opends/server/replication/protocol/ServerStartECLMsg.java
index b1ec977..db3b7e4 100644
--- a/opends/src/server/org/opends/server/replication/protocol/ServerStartECLMsg.java
+++ b/opends/src/server/org/opends/server/replication/protocol/ServerStartECLMsg.java
@@ -28,8 +28,6 @@
 package org.opends.server.replication.protocol;
 
 import java.io.UnsupportedEncodingException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
 import java.util.zip.DataFormatException;
 
 import org.opends.server.replication.common.ServerState;
@@ -67,6 +65,7 @@
    * Server after being connected to a replication server for a given
    * replication domain.
    *
+   * @param serverURL directory server URL
    * @param maxReceiveDelay The max receive delay for this server.
    * @param maxReceiveQueue The max receive Queue for this server.
    * @param maxSendDelay The max Send Delay from this server.
@@ -80,7 +79,7 @@
 *                      after the start messages have been exchanged.
    * @param groupId The group id of the DS for this DN
    */
-  public ServerStartECLMsg(int maxReceiveDelay,
+  public ServerStartECLMsg(String serverURL, int maxReceiveDelay,
                            int maxReceiveQueue, int maxSendDelay,
                            int maxSendQueue, int windowSize,
                            long heartbeatInterval,
@@ -92,6 +91,7 @@
   {
     super(protocolVersion, generationId);
 
+    this.serverURL = serverURL;
     this.maxReceiveDelay = maxReceiveDelay;
     this.maxReceiveQueue = maxReceiveQueue;
     this.maxSendDelay = maxSendDelay;
@@ -101,15 +101,6 @@
     this.sslEncryption = sslEncryption;
     this.serverState = serverState;
     this.groupId = groupId;
-
-    try
-    {
-      /* TODO : find a better way to get the server URL */
-      this.serverURL = InetAddress.getLocalHost().getHostName();
-    } catch (UnknownHostException e)
-    {
-      this.serverURL = "Unknown host";
-    }
   }
 
   /**

--
Gitblit v1.10.0