From 77e5e195fc05593141f765e492e7a83616503408 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 06 Apr 2007 23:39:26 +0000
Subject: [PATCH] Update the bind operation so that it provides access to the protocol version. Note that the protocol version is formatted as a string, because it may not necessarily always be purely numeric.

---
 opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java |   27 +++++++++++++++++++--------
 1 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java b/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
index 6c3467b..b3cdec4 100644
--- a/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
+++ b/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
@@ -102,6 +102,15 @@
 public class InternalClientConnection
        extends ClientConnection
 {
+  /**
+   * The protocol verison string that will be used for internal bind
+   * operations.  Since this is modeled after LDAPv3 binds, it will
+   * use a version number string of "3".
+   */
+  public static final String PROTOCOL_VERSION = "3";
+
+
+
   // The message ID counter to use for internal connections.
   private static AtomicInteger nextMessageID;
 
@@ -725,8 +734,8 @@
   {
     BindOperation bindOperation =
          new BindOperation(this, nextOperationID(), nextMessageID(),
-                           new ArrayList<Control>(0), rawBindDN,
-                           password);
+                           new ArrayList<Control>(0),
+                           PROTOCOL_VERSION, rawBindDN, password);
     bindOperation.setInternalOperation(true);
 
     bindOperation.run();
@@ -752,8 +761,8 @@
   {
     BindOperation bindOperation =
          new BindOperation(this, nextOperationID(), nextMessageID(),
-                           new ArrayList<Control>(0), bindDN,
-                           password);
+                           new ArrayList<Control>(0),
+                           PROTOCOL_VERSION, bindDN, password);
     bindOperation.setInternalOperation(true);
 
     bindOperation.run();
@@ -781,8 +790,9 @@
   {
     BindOperation bindOperation =
          new BindOperation(this, nextOperationID(), nextMessageID(),
-                           new ArrayList<Control>(0), rawBindDN,
-                           saslMechanism, saslCredentials);
+                           new ArrayList<Control>(0),
+                           PROTOCOL_VERSION, rawBindDN, saslMechanism,
+                           saslCredentials);
     bindOperation.setInternalOperation(true);
 
     bindOperation.run();
@@ -810,8 +820,9 @@
   {
     BindOperation bindOperation =
          new BindOperation(this, nextOperationID(), nextMessageID(),
-                           new ArrayList<Control>(0), bindDN,
-                           saslMechanism, saslCredentials);
+                           new ArrayList<Control>(0),
+                           PROTOCOL_VERSION, bindDN, saslMechanism,
+                           saslCredentials);
     bindOperation.setInternalOperation(true);
 
     bindOperation.run();

--
Gitblit v1.10.0