From 99480fcbcb68be6a357f6218668feab697e1a93d Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Tue, 07 Jul 2009 14:55:26 +0000
Subject: [PATCH] Fix for 4096 MonitorMsg is not compatible with replication version
---
opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java | 21 +++------------------
1 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java b/opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java
index 66624aa..3927cfd 100644
--- a/opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java
+++ b/opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java
@@ -276,25 +276,10 @@
public byte[] getBytes(short reqProtocolVersion)
throws UnsupportedEncodingException
{
-
- // Using current protocol version should normally not be done as we would
- // normally call the getBytes() method instead for that. So this check
- // for security
- if (reqProtocolVersion == ProtocolVersion.getCurrentVersion())
- {
+ if (reqProtocolVersion == ProtocolVersion.REPLICATION_PROTOCOL_V1)
+ return getBytes_V1();
+ else
return getBytes();
- }
-
- switch (reqProtocolVersion)
- {
- case ProtocolVersion.REPLICATION_PROTOCOL_V1:
- return getBytes_V1();
- default:
- // Unsupported requested version
- throw new UnsupportedEncodingException(getClass().getSimpleName() +
- " PDU does not support requested protocol version serialization: " +
- reqProtocolVersion);
- }
}
/**
--
Gitblit v1.10.0