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/plugin/PersistentServerState.java |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/plugin/PersistentServerState.java b/opends/src/server/org/opends/server/replication/plugin/PersistentServerState.java
index abeb007..1f67c46 100644
--- a/opends/src/server/org/opends/server/replication/plugin/PersistentServerState.java
+++ b/opends/src/server/org/opends/server/replication/plugin/PersistentServerState.java
@@ -73,7 +73,7 @@
    private final InternalClientConnection conn =
        InternalClientConnection.getRootConnection();
    private final ByteString asn1BaseDn;
-   private final short serverId;
+   private final int serverId;
 
    private final ServerState state;
 
@@ -97,7 +97,7 @@
    * @param baseDn The baseDN for which the ServerState is created
    * @param serverId The serverId
    */
-  public PersistentServerState(DN baseDn, short serverId)
+  public PersistentServerState(DN baseDn, int serverId)
   {
     this.baseDn = baseDn;
     this.serverId = serverId;
@@ -113,7 +113,7 @@
    * @param serverId  The serverId.
    * @param state     The serverState.
    */
-  public PersistentServerState(DN baseDn, short serverId, ServerState state)
+  public PersistentServerState(DN baseDn, int serverId, ServerState state)
   {
     this.baseDn = baseDn;
     this.serverId = serverId;
@@ -576,8 +576,8 @@
               Integer replicaId = Integer.parseInt(temp, 16);
 
               // No need to take into account the subSeqNum
-              ChangeNumber cn = new ChangeNumber(timeStamp*1000, seqNum,
-                  replicaId.shortValue());
+              ChangeNumber cn =
+                new ChangeNumber(timeStamp*1000, seqNum, replicaId);
 
               this.update(cn);
             }
@@ -673,7 +673,7 @@
    *
    * @return            The largest ChangeNumber seen.
    */
-  public ChangeNumber getMaxChangeNumber(short serverID)
+  public ChangeNumber getMaxChangeNumber(int serverID)
   {
     return state.getMaxChangeNumber(serverID);
   }

--
Gitblit v1.10.0