From 617fe1eab356125bc82c7bac69a322f5a29fbdc8 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Mon, 20 Dec 2010 21:07:50 +0000
Subject: [PATCH] Fix for OPENDJ-3 - persistent search option for cn=changelog The persistent search option for cn=changelog was only working with specific options that are not the default ones. More specifically, it wouldn't work in ChangesOnly mode (returning error 53: Unwilling to perform). Those changes are resolving the issues, fix a typo in a comment and changed code order and test to avoid double negatives.

---
 opends/src/server/org/opends/server/workflowelement/externalchangelog/ECLSearchOperation.java |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/opends/src/server/org/opends/server/workflowelement/externalchangelog/ECLSearchOperation.java b/opends/src/server/org/opends/server/workflowelement/externalchangelog/ECLSearchOperation.java
index f351404..62244c2 100644
--- a/opends/src/server/org/opends/server/workflowelement/externalchangelog/ECLSearchOperation.java
+++ b/opends/src/server/org/opends/server/workflowelement/externalchangelog/ECLSearchOperation.java
@@ -545,12 +545,12 @@
 
           // If we're only interested in changes, then we don't actually want
           // to process the search now.
-          if (!psearchControl.getChangesOnly())
-            startECLSessionMsg.setPersistent(
-                StartECLSessionMsg.PERSISTENT);
-          else
+          if (psearchControl.getChangesOnly())
             startECLSessionMsg.setPersistent(
                 StartECLSessionMsg.PERSISTENT_CHANGES_ONLY);
+          else
+            startECLSessionMsg.setPersistent(
+                StartECLSessionMsg.PERSISTENT);
         }
         else if (oid.equals(OID_LDAP_SUBENTRIES))
         {

--
Gitblit v1.10.0