mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
01.29.2011 6a7fdc04408e52abb5e5cacdc03f51a8e995d5cf
opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java
@@ -43,11 +43,7 @@
import org.opends.server.replication.common.RSInfo;
import org.opends.server.replication.common.ServerState;
import org.opends.server.replication.common.ServerStatus;
import org.opends.server.replication.protocol.ProtocolSession;
import org.opends.server.replication.protocol.ProtocolVersion;
import org.opends.server.replication.protocol.ReplServerStartMsg;
import org.opends.server.replication.protocol.ReplicationMsg;
import org.opends.server.replication.protocol.TopologyMsg;
import org.opends.server.replication.protocol.*;
import org.opends.server.types.Attribute;
import org.opends.server.types.AttributeBuilder;
import org.opends.server.types.Attributes;
@@ -195,9 +191,19 @@
      // Reject bad responses
      if (!(msg instanceof ReplServerStartMsg))
      {
        Message message = ERR_REPLICATION_PROTOCOL_MESSAGE_TYPE.get(
            msg.getClass().getCanonicalName(),
            "ReplServerStartMsg");
        Message message;
        if (msg instanceof StopMsg)
        {
          // Remote replication server is probably shutting down.
          message = ERR_RS_DISCONNECTED_DURING_HANDSHAKE.get(
              String.valueOf(getReplicationServerId()),
              session.getReadableRemoteAddress());
        }
        else
        {
          message = ERR_REPLICATION_PROTOCOL_MESSAGE_TYPE.get(msg
              .getClass().getCanonicalName(), "ReplServerStartMsg");
        }
        abortStart(message);
        return;
      }
@@ -495,9 +501,20 @@
    if (!(msg instanceof TopologyMsg))
    {
      Message message = ERR_REPLICATION_PROTOCOL_MESSAGE_TYPE.get(
          msg.getClass().getCanonicalName(),
          "TopologyMsg");
      Message message;
      if (msg instanceof StopMsg)
      {
        // Remote replication server is probably shutting down.
        message = ERR_RS_DISCONNECTED_DURING_HANDSHAKE.get(
            String.valueOf(getReplicationServerId()),
            session.getReadableRemoteAddress());
      }
      else
      {
        message = ERR_REPLICATION_PROTOCOL_MESSAGE_TYPE.get(
            msg.getClass().getCanonicalName(),
            "TopologyMsg");
      }
      abortStart(message);
    }