From c015616756e6faa64060971753bc77978ae82dec Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Wed, 07 Oct 2009 12:19:42 +0000
Subject: [PATCH] The documentation and the configuration of a Replication Domain allow a maximum value of 65535 for the server-id property. Nevertheless, the server-id in the ReplicationDomain implementation is managed as a short allowing a maximum value of 32767.

---
 opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 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 a288986..8693dd9 100644
--- a/opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java
+++ b/opends/src/server/org/opends/server/replication/server/ReplicationServerHandler.java
@@ -69,8 +69,8 @@
    * this collection will contain as many elements as there are
    * LDAP servers connected to the remote replication server.
    */
-  private final Map<Short, LightweightServerHandler> remoteDirectoryServers =
-    new ConcurrentHashMap<Short, LightweightServerHandler>();
+  private final Map<Integer, LightweightServerHandler> remoteDirectoryServers =
+    new ConcurrentHashMap<Integer, LightweightServerHandler>();
 
   /**
    * Starts this handler based on a start message received from remote server.
@@ -133,7 +133,7 @@
       ProtocolSession session,
       int queueSize,
       String replicationServerURL,
-      short replicationServerId,
+      int replicationServerId,
       ReplicationServer replicationServer,
       int rcvWindowSize)
   {
@@ -323,7 +323,7 @@
                   // then  we are just degrading the peer.
                   Message message = NOTE_BAD_GENERATION_ID_FROM_RS.get(
                     getServiceId(),
-                    Short.toString(serverId),
+                    Integer.toString(serverId),
                     Long.toString(generationId),
                     Long.toString(localGenerationId));
                   logError(message);
@@ -350,7 +350,7 @@
                   // setGenerationId(generationId, false);
                   Message message = NOTE_BAD_GENERATION_ID_FROM_RS.get(
                     getServiceId(),
-                    Short.toString(serverId),
+                    Integer.toString(serverId),
                     Long.toString(generationId),
                     Long.toString(localGenerationId));
                   logError(message);
@@ -412,7 +412,7 @@
   {
     // Alright, connected with new RS (either outgoing or incoming
     // connection): store handler.
-    Map<Short, ReplicationServerHandler> connectedRSs =
+    Map<Integer, ReplicationServerHandler> connectedRSs =
       replicationServerDomain.getConnectedRSs();
     connectedRSs.put(serverId, this);
   }
@@ -493,7 +493,7 @@
               // then  we are just degrading the peer.
               Message message = NOTE_BAD_GENERATION_ID_FROM_RS.get(
                   getServiceId(),
-                  Short.toString(serverId),
+                  Integer.toString(serverId),
                   Long.toString(generationId),
                   Long.toString(localGenerationId));
               logError(message);
@@ -521,7 +521,7 @@
               // setGenerationId(generationId, false);
               Message message = NOTE_BAD_GENERATION_ID_FROM_RS.get(
                   getServiceId(),
-                  Short.toString(serverId),
+                  Integer.toString(serverId),
                   Long.toString(generationId),
                   Long.toString(localGenerationId));
               logError(message);
@@ -648,7 +648,7 @@
    * @return boolean True is the wanted server is connected to the server
    * represented by this handler.
    */
-  public boolean isRemoteLDAPServer(short wantedServer)
+  public boolean isRemoteLDAPServer(int wantedServer)
   {
     synchronized (remoteDirectoryServers)
     {
@@ -682,7 +682,7 @@
    * Return a Set containing the servers known by this replicationServer.
    * @return a set containing the servers known by this replicationServer.
    */
-  public Set<Short> getConnectedDirectoryServerIds()
+  public Set<Integer> getConnectedDirectoryServerIds()
   {
     synchronized (remoteDirectoryServers)
     {

--
Gitblit v1.10.0