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/TLSSocketSession.java | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/protocol/TLSSocketSession.java b/opends/src/server/org/opends/server/replication/protocol/TLSSocketSession.java
index 292cbea..805e8ba 100644
--- a/opends/src/server/org/opends/server/replication/protocol/TLSSocketSession.java
+++ b/opends/src/server/org/opends/server/replication/protocol/TLSSocketSession.java
@@ -23,7 +23,7 @@
*
*
* Copyright 2006-2009 Sun Microsystems, Inc.
- * Portions Copyright 2011-2012 ForgeRock AS
+ * Portions Copyright 2011-2013 ForgeRock AS
*/
package org.opends.server.replication.protocol;
@@ -65,6 +65,7 @@
private final byte[] rcvLengthBuf = new byte[8];
private final String readableRemoteAddress;
private final String remoteAddress;
+ private final String localUrl;
/**
* The time the last message published to this session.
@@ -124,8 +125,9 @@
this.output = secureSocket.getOutputStream();
this.readableRemoteAddress = plainSocket.getRemoteSocketAddress()
.toString();
- this.remoteAddress = plainSocket.getInetAddress()
- .getHostAddress();
+ this.remoteAddress = plainSocket.getInetAddress().getHostAddress();
+ this.localUrl = plainSocket.getLocalAddress().getHostName() + ":"
+ + plainSocket.getLocalPort();
}
@@ -260,6 +262,17 @@
* {@inheritDoc}
*/
@Override
+ public String getLocalUrl()
+ {
+ return localUrl;
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
public String getReadableRemoteAddress()
{
return readableRemoteAddress;
--
Gitblit v1.10.0