From bc825f37f327005ce417c8bda658b591e5bca35a Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Tue, 13 Mar 2007 21:01:59 +0000
Subject: [PATCH] Update the LDAPConnection object and the classes that use it to ensure that it can perform an unbind before closing the connection.
---
opends/src/server/org/opends/server/tools/LDAPDelete.java | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/opends/src/server/org/opends/server/tools/LDAPDelete.java b/opends/src/server/org/opends/server/tools/LDAPDelete.java
index 4cdb3e9..5d38681 100644
--- a/opends/src/server/org/opends/server/tools/LDAPDelete.java
+++ b/opends/src/server/org/opends/server/tools/LDAPDelete.java
@@ -688,6 +688,7 @@
}
}
+ LDAPDelete ldapDelete = null;
try
{
if (initializeServer)
@@ -722,7 +723,7 @@
connectionOptions, out, err);
connection.connectToHost(bindDNValue, bindPasswordValue, nextMessageID);
- LDAPDelete ldapDelete = new LDAPDelete(nextMessageID, out, err);
+ ldapDelete = new LDAPDelete(nextMessageID, out, err);
if(fileNameValue == null && dnStrings.isEmpty())
{
// Read from stdin.
@@ -769,7 +770,14 @@
{
if(connection != null)
{
- connection.close();
+ if (ldapDelete == null)
+ {
+ connection.close(null);
+ }
+ else
+ {
+ connection.close(ldapDelete.nextMessageID);
+ }
}
}
return 0;
--
Gitblit v1.10.0