From 96eaa516a85e620a6b76a64ffbe71cdc6037e026 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Wed, 13 Apr 2011 16:23:40 +0000
Subject: [PATCH] Initial fix for OpenDJ-97: Very many minor problems with the error logging for replication
---
opends/src/server/org/opends/server/replication/protocol/ReplSessionSecurity.java | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/protocol/ReplSessionSecurity.java b/opends/src/server/org/opends/server/replication/protocol/ReplSessionSecurity.java
index 204b776..769aa1e 100644
--- a/opends/src/server/org/opends/server/replication/protocol/ReplSessionSecurity.java
+++ b/opends/src/server/org/opends/server/replication/protocol/ReplSessionSecurity.java
@@ -34,7 +34,6 @@
import static org.opends.server.loggers.ErrorLogger.logError;
import java.io.IOException;
-import java.net.InetAddress;
import java.net.Socket;
import java.util.SortedSet;
@@ -156,8 +155,6 @@
/**
* Create a new protocol session in the client role on the provided socket.
*
- * @param serverURL
- * The remote replication server to which the socket is connected.
* @param socket
* The connected socket.
* @param soTimeout
@@ -170,9 +167,8 @@
* If the protocol session could not be established for some other
* reason.
*/
- public ProtocolSession createClientSession(final String serverURL,
- final Socket socket, final int soTimeout)
- throws ConfigException, IOException
+ public ProtocolSession createClientSession(final Socket socket,
+ final int soTimeout) throws ConfigException, IOException
{
boolean hasCompleted = false;
SSLSocket secureSocket = null;
@@ -297,9 +293,9 @@
{
// This is probably a connection attempt from an unexpected client
// log that to warn the administrator.
- final InetAddress remHost = socket.getInetAddress();
- final Message message = NOTE_SSL_SERVER_CON_ATTEMPT_ERROR.get(
- remHost.getHostName(), remHost.getHostAddress(),
+ final Message message = INFO_SSL_SERVER_CON_ATTEMPT_ERROR.get(
+ socket.getRemoteSocketAddress().toString(),
+ socket.getLocalSocketAddress().toString(),
e.getLocalizedMessage());
logError(message);
return null;
--
Gitblit v1.10.0