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/EntryMsg.java | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/protocol/EntryMsg.java b/opends/src/server/org/opends/server/replication/protocol/EntryMsg.java
index fb5c846..270a36c 100644
--- a/opends/src/server/org/opends/server/replication/protocol/EntryMsg.java
+++ b/opends/src/server/org/opends/server/replication/protocol/EntryMsg.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;
@@ -48,8 +48,8 @@
* @param entryBytes The bytes of the entry.
*/
public EntryMsg(
- short sender,
- short destination,
+ int sender,
+ int destination,
byte[] entryBytes)
{
super(sender, destination);
@@ -60,20 +60,20 @@
/**
* Creates a new EntryMsg.
*
- * @param sender The sender of this message.
- * @param destination The destination of this message.
+ * @param serverID The sender of this message.
+ * @param i The destination of this message.
* @param entryBytes The bytes of the entry.
* @param pos The starting Position in the array.
* @param length Number of array elements to be copied.
*/
public EntryMsg(
- short sender,
- short destination,
+ int serverID,
+ int i,
byte[] entryBytes,
int pos,
int length)
{
- super(sender, destination);
+ super(serverID, i);
this.entryByteArray = new byte[length];
System.arraycopy(entryBytes, pos, this.entryByteArray, 0, length);
}
@@ -97,13 +97,13 @@
// sender
int length = getNextLength(in, pos);
String senderIDString = new String(in, pos, length, "UTF-8");
- this.senderID = Short.valueOf(senderIDString);
+ this.senderID = Integer.valueOf(senderIDString);
pos += length +1;
// destination
length = getNextLength(in, pos);
String destinationString = new String(in, pos, length, "UTF-8");
- this.destination = Short.valueOf(destinationString);
+ this.destination = Integer.valueOf(destinationString);
pos += length +1;
// entry
--
Gitblit v1.10.0