From b45e7fb00a64d2fd8897a485def4296d03c39b55 Mon Sep 17 00:00:00 2001
From: dugan <dugan@localhost>
Date: Wed, 18 Feb 2009 14:19:40 +0000
Subject: [PATCH] Commit SASL Phase2 changes. Issue 3805. Unit tests to follow later.
---
opends/src/server/org/opends/server/util/StaticUtils.java | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/opends/src/server/org/opends/server/util/StaticUtils.java b/opends/src/server/org/opends/server/util/StaticUtils.java
index b2311aa..6280b11 100644
--- a/opends/src/server/org/opends/server/util/StaticUtils.java
+++ b/opends/src/server/org/opends/server/util/StaticUtils.java
@@ -4170,21 +4170,14 @@
* problem). If possible, it will attempt to use the selector returned
* by the {@code ClientConnection.getWriteSelector} method, but it is
* capable of working even if that method returns {@code null}. <BR>
- * <BR>
- * Note that this method has been written in a generic manner so that
- * other connection security providers can use it to send data to the
- * client, provided that the given buffer contains the appropriate
- * pre-encoded information. <BR>
- * <BR>
- * Also note that the original position and limit values will not be
+ *
+ * Note that the original position and limit values will not be
* preserved, so if that is important to the caller, then it should
* record them before calling this method and restore them after it
* returns.
*
* @param clientConnection
* The client connection to which the data is to be written.
- * @param socketChannel
- * The socket channel over which to write the data.
* @param buffer
* The data to be written to the client.
* @return <CODE>true</CODE> if all the data in the provided buffer was
@@ -4198,10 +4191,10 @@
* client. The caller will be responsible for catching this
* and terminating the client connection.
*/
- public static boolean writeWithTimeout(
- ClientConnection clientConnection, SocketChannel socketChannel,
+ public static boolean writeWithTimeout(ClientConnection clientConnection,
ByteBuffer buffer) throws IOException
{
+ SocketChannel socketChannel = clientConnection.getSocketChannel();
long startTime = System.currentTimeMillis();
long waitTime = clientConnection.getMaxBlockedWriteTimeLimit();
if (waitTime <= 0)
--
Gitblit v1.10.0