From 46e6061d63562ce021ef8f3b5062d3eba1c2db4e Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Fri, 17 Nov 2006 13:46:39 +0000
Subject: [PATCH] The synchronization changelog monitoring information has a counter named waiting-changes that publish the number of updates known by the changelog server that have not yest been sent to each ldap server because they are too slow to replay them.
---
opends/src/server/org/opends/server/synchronization/protocol/AckMessage.java | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/AckMessage.java b/opends/src/server/org/opends/server/synchronization/protocol/AckMessage.java
index cb35f38..e9c5f55 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/AckMessage.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/AckMessage.java
@@ -65,10 +65,9 @@
throw new DataFormatException("byte[] is not a valid modify msg");
int pos = 1;
- /* read the changeNumber
- * it is always 24 characters long
- */
- String changenumberStr = new String(in, pos, 24, "UTF-8");
+ /* read the changeNumber */
+ int length = getNextLength(in, pos);
+ String changenumberStr = new String(in, pos, length, "UTF-8");
changeNumber = new ChangeNumber(changenumberStr);
pos +=24;
} catch (UnsupportedEncodingException e)
@@ -95,7 +94,8 @@
{
try
{
- int length = 1 + 24;
+ byte[] changeNumberByte = changeNumber.toString().getBytes("UTF-8");
+ int length = 1 + changeNumberByte.length + 1;
byte[] resultByteArray = new byte[length];
int pos = 1;
@@ -103,14 +103,8 @@
resultByteArray[0] = MSG_TYPE_ACK;
/* put the ChangeNumber */
- byte[] changeNumberByte;
+ pos = addByteArray(changeNumberByte, resultByteArray, pos);
- changeNumberByte = this.getChangeNumber().toString().getBytes("UTF-8");
-
- for (int i=0; i<24; i++,pos++)
- {
- resultByteArray[pos] = changeNumberByte[i];
- }
return resultByteArray;
} catch (UnsupportedEncodingException e)
{
--
Gitblit v1.10.0