mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Ludovic Poitou
30.06.2011 491a78a88c413300af5593048826a7552b64af1d
opends/src/server/org/opends/server/workflowelement/externalchangelog/ECLSearchOperation.java
@@ -184,6 +184,11 @@
  private ExternalChangeLogSession eclSession;
  /**
   * A flag to know if the ECLControl has been requested.
   */
  private Boolean returnECLControl = false;
  /**
   * Creates a new operation that may be used to search for entries in a local
   * backend of the Directory Server.
   *
@@ -406,6 +411,7 @@
          ExternalChangelogRequestControl eclControl =
            getRequestControl(ExternalChangelogRequestControl.DECODER);
          MultiDomainServerState cookie = eclControl.getCookie();
          returnECLControl = true;
          if (cookie!=null)
          {
            startECLSessionMsg.setECLRequestType(
@@ -675,11 +681,16 @@
    final Entry entry = createEntryFromMsg(eclmsg);
    if (matchScopeAndFilter(entry))
    {
      List<Control> controls = new ArrayList<Control>(1);
      EntryChangelogNotificationControl clrc =
        new EntryChangelogNotificationControl(
            true, eclmsg.getCookie().toString());
      controls.add(clrc);
      List<Control> controls = null;
      if (returnECLControl)
      {
        controls = new ArrayList<Control>(1);
        EntryChangelogNotificationControl clrc =
            new EntryChangelogNotificationControl(
                true, eclmsg.getCookie().toString());
        controls.add(clrc);
      }
      return returnEntry(entry, controls);
    }
    return true;