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/ReplicationServer.java |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/server/ReplicationServer.java b/opends/src/server/org/opends/server/replication/server/ReplicationServer.java
index 8c3dcd5..c725b4f 100644
--- a/opends/src/server/org/opends/server/replication/server/ReplicationServer.java
+++ b/opends/src/server/org/opends/server/replication/server/ReplicationServer.java
@@ -114,7 +114,7 @@
              BackupTaskListener, RestoreTaskListener, ImportTaskListener,
              ExportTaskListener
 {
-  private short serverId;
+  private int serverId;
   private String serverURL;
 
   private ServerSocket listenSocket;
@@ -198,7 +198,7 @@
     throws ConfigException
   {
     replicationPort = configuration.getReplicationPort();
-    serverId = (short) configuration.getReplicationServerId();
+    serverId = configuration.getReplicationServerId();
     replicationServers = configuration.getReplicationServer();
     if (replicationServers == null)
       replicationServers = new ArrayList<String>();
@@ -802,7 +802,7 @@
    *         DN given in parameter.
    * @throws DatabaseException in case of underlying database problem.
    */
-  public DbHandler newDbHandler(short id, String baseDn)
+  public DbHandler newDbHandler(int id, String baseDn)
   throws DatabaseException
   {
     return new DbHandler(id, baseDn, this, dbEnv, queueSize);
@@ -1019,7 +1019,7 @@
    * @return The value of the serverId.
    *
    */
-  public short getServerId()
+  public int getServerId()
   {
     return serverId;
   }
@@ -1558,7 +1558,7 @@
 
     if (eligibleCN==null)
     {
-      eligibleCN = new ChangeNumber(0,0,(short)0);
+      eligibleCN = new ChangeNumber(0, 0, 0);
     }
 
     if (debugEnabled())

--
Gitblit v1.10.0