From 05dfa5fee15b191c3ee1afae0010b70733b1a35b Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Mon, 25 Jun 2007 15:51:57 +0000
Subject: [PATCH] Update the pre-parse and pre-operation plugin results to add the ability to skip core processing without skipping post-operation plugins.  Also, make sure that post-response plugins are always invoked for all operations that get far enough in their processing to have called the pre-parse plugins.

---
 opends/src/server/org/opends/server/core/BindOperation.java |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/core/BindOperation.java b/opends/src/server/org/opends/server/core/BindOperation.java
index 3f780ed..a62bff4 100644
--- a/opends/src/server/org/opends/server/core/BindOperation.java
+++ b/opends/src/server/org/opends/server/core/BindOperation.java
@@ -1009,6 +1009,7 @@
 
         logBindRequest(this);
         logBindResponse(this);
+        pluginConfigManager.invokePostResponseBindPlugins(this);
         return;
       }
       else if (preParseResult.sendResponseImmediately())
@@ -1017,6 +1018,11 @@
         logBindRequest(this);
         break bindProcessing;
       }
+      else if (preParseResult.skipCoreProcessing())
+      {
+        skipPostOperation = false;
+        break bindProcessing;
+      }
 
 
       // Log the bind request message.
@@ -1145,6 +1151,7 @@
               processingStopTime = System.currentTimeMillis();
 
               logBindResponse(this);
+              pluginConfigManager.invokePostResponseBindPlugins(this);
               return;
             }
             else if (preOpResult.sendResponseImmediately())
@@ -1152,6 +1159,11 @@
               skipPostOperation = true;
               break bindProcessing;
             }
+            else if (preOpResult.skipCoreProcessing())
+            {
+              skipPostOperation = false;
+              break bindProcessing;
+            }
 
             setResultCode(ResultCode.SUCCESS);
             authInfo = new AuthenticationInfo();
@@ -1444,6 +1456,7 @@
               processingStopTime = System.currentTimeMillis();
 
               logBindResponse(this);
+              pluginConfigManager.invokePostResponseBindPlugins(this);
               return;
             }
             else if (preOpResult.sendResponseImmediately())
@@ -1451,6 +1464,11 @@
               skipPostOperation = true;
               break bindProcessing;
             }
+            else if (preOpResult.skipCoreProcessing())
+            {
+              skipPostOperation = false;
+              break bindProcessing;
+            }
 
 
             // Determine whether the provided password matches any of the stored
@@ -1737,6 +1755,7 @@
             processingStopTime = System.currentTimeMillis();
 
             logBindResponse(this);
+            pluginConfigManager.invokePostResponseBindPlugins(this);
             return;
           }
           else if (preOpResult.sendResponseImmediately())
@@ -1744,6 +1763,11 @@
             skipPostOperation = true;
             break bindProcessing;
           }
+          else if (preOpResult.skipCoreProcessing())
+          {
+            skipPostOperation = false;
+            break bindProcessing;
+          }
 
 
           // Actually process the SASL bind.
@@ -2244,6 +2268,7 @@
         processingStopTime = System.currentTimeMillis();
 
         logBindResponse(this);
+        pluginConfigManager.invokePostResponseBindPlugins(this);
         return;
       }
     }

--
Gitblit v1.10.0