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/common/ChangeNumberGenerator.java |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/common/ChangeNumberGenerator.java b/opends/src/server/org/opends/server/replication/common/ChangeNumberGenerator.java
index f402dba..af9174d 100644
--- a/opends/src/server/org/opends/server/replication/common/ChangeNumberGenerator.java
+++ b/opends/src/server/org/opends/server/replication/common/ChangeNumberGenerator.java
@@ -38,17 +38,17 @@
 {
   private long lastTime;
   private int seqnum;
-  private short serverId;
+  private int serverId;
 
   /**
    * Create a new ChangeNumber Generator.
-   * @param id id to use when creating change numbers.
+   * @param serverID2 id to use when creating change numbers.
    * @param timestamp time to start with.
    */
-  public ChangeNumberGenerator(short id, long timestamp)
+  public ChangeNumberGenerator(int serverID2, long timestamp)
   {
     this.lastTime = timestamp;
-    this.serverId = id;
+    this.serverId = serverID2;
     this.seqnum = 0;
   }
 
@@ -60,10 +60,10 @@
   *              all change numbers generated will be larger than all the
   *              changenumbers currently in state.
   */
- public ChangeNumberGenerator(short id, ServerState state)
+ public ChangeNumberGenerator(int id, ServerState state)
  {
    this.lastTime = TimeThread.getTime();
-   for (short stateId : state)
+   for (int stateId : state)
    {
      if (this.lastTime < state.getMaxChangeNumber(stateId).getTime())
        this.lastTime = state.getMaxChangeNumber(stateId).getTime();
@@ -125,7 +125,7 @@
 
     long rcvdTime = number.getTime();
 
-    short changeServerId = number.getServerId();
+    int changeServerId = number.getServerId();
     int changeSeqNum = number.getSeqnum();
 
     /* need to synchronize with NewChangeNumber method so that we
@@ -151,7 +151,7 @@
    */
   public void adjust(ServerState state)
   {
-    for (short localServerId : state)
+    for (int localServerId : state)
     {
       adjust(state.getMaxChangeNumber(localServerId));
      }

--
Gitblit v1.10.0