From 66c1a80d263b71195a525d1c1fdd59e464a606ae Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Fri, 20 Aug 2010 13:39:26 +0000
Subject: [PATCH] Fix all command lines that are doing Searches with JNDI, to avoid them sending systematic Abandon requests.

---
 opends/src/guitools/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java
index d6ed200..a13a4e9 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java
@@ -122,6 +122,7 @@
   /**
    * {@inheritDoc}
    */
+  @Override
   public Message getTitle()
   {
     return INFO_CTRL_PANEL_LOCAL_OR_REMOTE_PANEL_TITLE.get();
@@ -130,6 +131,7 @@
   /**
    * {@inheritDoc}
    */
+  @Override
   public GenericDialog.ButtonType getButtonType()
   {
     return GenericDialog.ButtonType.OK_CANCEL;
@@ -406,6 +408,7 @@
   /**
    * {@inheritDoc}
    */
+  @Override
   public Component getPreferredFocusComponent()
   {
     if (pwd.isVisible())
@@ -428,6 +431,7 @@
   /**
    * {@inheritDoc}
    */
+  @Override
   public void toBeDisplayed(boolean visible)
   {
     super.toBeDisplayed(visible);
@@ -436,6 +440,7 @@
       // Do it outside the event thread if the panel requires it.
       BackgroundTask<Void> worker = new BackgroundTask<Void>()
       {
+        @Override
         public Void processBackgroundTask() throws Throwable
         {
           try
@@ -451,6 +456,7 @@
         }
 
 
+        @Override
         public void backgroundTaskCompleted(Void returnValue,
             Throwable t)
         {
@@ -479,6 +485,7 @@
   /**
    * {@inheritDoc}
    */
+  @Override
   public void okClicked()
   {
     setPrimaryValid(portLabel);
@@ -553,6 +560,7 @@
         /**
          * {@inheritDoc}
          */
+        @Override
         public InitialLdapContext processBackgroundTask() throws Throwable
         {
           getInfo().stopPooling();
@@ -638,6 +646,7 @@
         /**
          * {@inheritDoc}
          */
+        @Override
         public void backgroundTaskCompleted(InitialLdapContext ctx,
             Throwable throwable)
         {
@@ -818,6 +827,7 @@
   /**
    * {@inheritDoc}
    */
+  @Override
   public void cancelClicked()
   {
     setPrimaryValid(dnLabel);
@@ -945,7 +955,6 @@
        * Search for the version on the remote server.
        */
       SearchControls searchControls = new SearchControls();
-      searchControls.setCountLimit(1);
       searchControls.setSearchScope(
       SearchControls.OBJECT_SCOPE);
       searchControls.setReturningAttributes(
@@ -961,7 +970,10 @@
       SearchResult sr = null;
       try
       {
-        sr = en.next();
+        while (en.hasMore())
+        {
+          sr = en.next();
+        }
       }
       finally
       {

--
Gitblit v1.10.0