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

jdemendi
19.46.2007 1ad53161c35dfbd2c08b1f124d237f5f3cad9110
opends/src/server/org/opends/server/core/SearchOperationBasis.java
@@ -1151,8 +1151,7 @@
      // Invoke the post-response search plugins.
      DirectoryServer.getPluginConfigManager().
           invokePostResponseSearchPlugins(this);
      invokePostResponsePlugins();
    }
  }
@@ -1631,17 +1630,18 @@
    setTimeLimitExpiration(timeLimitExpiration);
    // Check for and handle a request to cancel this operation.
    if (getCancelRequest() != null)
    if (cancelRequest != null)
    {
      indicateCancelled(getCancelRequest());
      indicateCancelled(cancelRequest);
      setProcessingStopTime();
      logSearchResultDone(this);
      return;
    }
    // Create a labeled block of code that we can break out of if a problem is
    // detected.
    searchProcessing:
searchProcessing:
    {
      PreParsePluginResult preParseResult =
        pluginConfigManager.invokePreParseSearchPlugins(this);
@@ -1677,13 +1677,9 @@
      // Check for and handle a request to cancel this operation.
      if (getCancelRequest() != null)
      if (cancelRequest != null)
      {
        indicateCancelled(getCancelRequest());
        setProcessingStopTime();
        logSearchResultDone(this);
        pluginConfigManager.invokePostResponseSearchPlugins(this);
        return;
        break searchProcessing;
      }
@@ -1710,17 +1706,37 @@
      workflow.execute(this);
    }
    // Check for and handle a request to cancel this operation.
    if ((getCancelRequest() != null) ||
        (getCancelResult() == CancelResult.CANCELED))
    // Check for a terminated connection.
    if (getCancelResult() == CancelResult.CANCELED)
    {
      indicateCancelled(getCancelRequest());
      // Stop the processing timer.
      setProcessingStopTime();
      // Log the add response message.
      logSearchResultDone(this);
      pluginConfigManager.invokePostResponseSearchPlugins(this);
      return;
    }
    // Check for and handle a request to cancel this operation.
    if (cancelRequest != null)
    {
      indicateCancelled(cancelRequest);
      // Stop the processing timer.
      setProcessingStopTime();
      // Log the search response message.
      logSearchResultDone(this);
      // Invoke the post-response search plugins.
      invokePostResponsePlugins();
      return;
    }
    // Indicate that it is now too late to attempt to cancel the operation.
    setCancelResult(CancelResult.TOO_LATE);
@@ -1743,6 +1759,22 @@
    }
  }
  /**
   * Invokes the post response plugins.
   */
  private void invokePostResponsePlugins()
  {
    // Get the plugin config manager that will be used for invoking plugins.
    PluginConfigManager pluginConfigManager =
      DirectoryServer.getPluginConfigManager();
    // Invoke the post response plugins that have been registered with
    // the current operation
    pluginConfigManager.invokePostResponseSearchPlugins(this);
  }
  /**
   * Updates the error message and the result code of the operation.
   *