From 90a85f0fed34b0a7d6db93022074a39a17ad27b7 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Fri, 24 Apr 2009 17:05:14 +0000
Subject: [PATCH] Fix for issue where unit tests hang when the startTLS extended operation is used.
---
opends/src/server/org/opends/server/core/BindOperationBasis.java | 23 ++++++++++-------------
1 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/BindOperationBasis.java b/opends/src/server/org/opends/server/core/BindOperationBasis.java
index 01110df..44e8797 100644
--- a/opends/src/server/org/opends/server/core/BindOperationBasis.java
+++ b/opends/src/server/org/opends/server/core/BindOperationBasis.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Copyright 2007-2008 Sun Microsystems, Inc.
+ * Copyright 2007-2009 Sun Microsystems, Inc.
*/
package org.opends.server.core;
import org.opends.messages.Message;
@@ -728,11 +728,6 @@
ClientConnection clientConnection = getClientConnection();
- // Set a flag to indicate that a bind operation is in progress. This should
- // ensure that no new operations will be accepted for this client until the
- // bind is complete.
- clientConnection.setBindInProgress(true);
-
// Wipe out any existing authentication for the client connection and create
// a placeholder that will be used if the bind is successful.
clientConnection.setUnauthenticated();
@@ -838,19 +833,21 @@
}
finally
{
- // If the bind processing is finished, then unset the "bind in progress"
- // flag to allow other operations to be processed on the connection.
- if (getResultCode() != ResultCode.SASL_BIND_IN_PROGRESS)
- {
- clientConnection.setBindInProgress(false);
- }
-
// Stop the processing timer.
setProcessingStopTime();
// Send the bind response to the client.
clientConnection.sendResponse(this);
+ // If the bind processing is finished, then unset the "bind in progress"
+ // flag to allow other operations to be processed on the connection.
+ if (getResultCode() != ResultCode.SASL_BIND_IN_PROGRESS)
+ {
+ clientConnection.finishSaslBind();
+ }
+
+ clientConnection.finishBindOrStartTLS();
+
// Log the bind response.
logBindResponse(this);
--
Gitblit v1.10.0