mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
17.07.2009 a0843f89806c512784a1752421fe384a97a35810
opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java
@@ -1067,7 +1067,9 @@
    String bindDn2 = null;
    String pwd2 = null;
    ci.resetHeadingDisplayed();
    ci.resetTrustManager();
    boolean doNotDisplayFirstError = false;
    if (!cancelled)
    {
      host2 = argParser.getHostName2();
@@ -1087,6 +1089,7 @@
      }
      else if (bindDn2 == null)
      {
        doNotDisplayFirstError = true;
        pwd = adminPwd;
        if (argParser.getSecureArgsList().bindPasswordFileArg.isPresent())
        {
@@ -1156,10 +1159,19 @@
      catch (ClientException ce)
      {
        LOG.log(Level.WARNING, "Client exception "+ce);
        println();
        println(ce.getMessageObject());
        println();
        ci.resetConnectionArguments();
        if (!doNotDisplayFirstError)
        {
          println();
          println(ce.getMessageObject());
          println();
          ci.resetConnectionArguments();
        }
        else
        {
          // Reset only the credential parameters.
          ci.resetConnectionArguments();
          ci.initializeGlobalArguments(host2, port2, null, null, null, null);
        }
      }
      catch (ArgumentException ae)
      {
@@ -1169,6 +1181,10 @@
        println();
        cancelled = true;
      }
      finally
      {
        doNotDisplayFirstError = false;
      }
    }
    if (!cancelled)