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/protocol/ErrorMsg.java |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/protocol/ErrorMsg.java b/opends/src/server/org/opends/server/replication/protocol/ErrorMsg.java
index bb8b2fd..8d1c0c1 100644
--- a/opends/src/server/org/opends/server/replication/protocol/ErrorMsg.java
+++ b/opends/src/server/org/opends/server/replication/protocol/ErrorMsg.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Copyright 2006-2009 Sun Microsystems, Inc.
  */
 package org.opends.server.replication.protocol;
 import org.opends.messages.Message;
@@ -58,7 +58,7 @@
    * @param destination The destination server or servers of this message.
    * @param details The message containing the details of the error.
    */
-  public ErrorMsg(short sender, short destination,
+  public ErrorMsg(int sender, int destination,
                       Message details)
   {
     super(sender, destination);
@@ -72,12 +72,12 @@
   /**
    * Creates an ErrorMsg.
    *
-   * @param destination replication server id
+   * @param i replication server id
    * @param details details of the error
    */
-  public ErrorMsg(short destination, Message details)
+  public ErrorMsg(int i, Message details)
   {
-    super((short)-2, destination);
+    super(-2, i);
     this.msgID  = details.getDescriptor().getId();
     this.details = details;
 
@@ -105,13 +105,13 @@
       // sender
       int length = getNextLength(in, pos);
       String senderString = new String(in, pos, length, "UTF-8");
-      senderID = Short.valueOf(senderString);
+      senderID = Integer.valueOf(senderString);
       pos += length +1;
 
       // destination
       length = getNextLength(in, pos);
       String serverIdString = new String(in, pos, length, "UTF-8");
-      destination = Short.valueOf(serverIdString);
+      destination = Integer.valueOf(serverIdString);
       pos += length +1;
 
       // MsgID

--
Gitblit v1.10.0