From 3cf5c194f00ddecc9b54d2ffed9ca10a8e6f2208 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Sun, 16 Jul 2006 05:33:29 +0000
Subject: [PATCH] Update the LDAP connection handler so that the size units for the max request size configuration attribute are consistent with the size units used in various configuration attributes for the JE backend.  In particular, the following are now true:

---
 opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java b/opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
index 1433923..fecae18 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
@@ -121,6 +121,14 @@
 
   /**
    * The unit string that will be used to designate that a value is in
+   * kibibytes.
+   */
+  public static final String UNIT_KIBIBYTES = "KiB";
+
+
+
+  /**
+   * The unit string that will be used to designate that a value is in
    * megabytes.
    */
   public static final String UNIT_MEGABYTES = "MB";
@@ -128,6 +136,14 @@
 
 
   /**
+   * The unit string that will be used to designate that a value is in
+   * mebibytes.
+   */
+  public static final String UNIT_MEBIBYTES = "MiB";
+
+
+
+  /**
    * The hash map that holds the units that may be provided in conjunction with
    * the maximum request size.
    */
@@ -137,8 +153,10 @@
   static
   {
     SIZE_UNITS.put(UNIT_BYTES, 1.0);
-    SIZE_UNITS.put(UNIT_KILOBYTES, 1024.0);
-    SIZE_UNITS.put(UNIT_MEGABYTES, 1048576.0);
+    SIZE_UNITS.put(UNIT_KILOBYTES, 1000.0);
+    SIZE_UNITS.put(UNIT_KIBIBYTES, 1024.0);
+    SIZE_UNITS.put(UNIT_MEGABYTES, 1000000.0);
+    SIZE_UNITS.put(UNIT_MEBIBYTES, 1048576.0);
   }
 
 

--
Gitblit v1.10.0