ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh ScpToMessage.java
Date Fri, 28 Nov 2003 09:28:49 GMT
bodewig     2003/11/28 01:28:49

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/ssh
                        ScpToMessage.java
  Log:
  Under some circumstances scp would miss responses from the remote side
  leading to corrupted files.
  
  PR: 24449
  Submitted by:	Atsuhiko Yamanaka <ymnk at jcraft dot com>
  
  Revision  Changes    Path
  1.5       +2 -2      ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java
  
  Index: ScpToMessage.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ScpToMessage.java	9 Jul 2003 12:12:59 -0000	1.4
  +++ ScpToMessage.java	28 Nov 2003 09:28:49 -0000	1.5
  @@ -113,7 +113,6 @@
   
               waitForAck(in);
               sendFileToRemote(localFile, in, out);
  -            waitForAck(in);
           } finally {
               if (channel != null) {
                   channel.disconnect();
  @@ -134,7 +133,6 @@
                   Directory current = (Directory) i.next();
                   sendDirectory(current, in, out);
               }
  -            waitForAck(in);
           } finally {
               if (channel != null) {
                   channel.disconnect();
  @@ -167,6 +165,7 @@
           waitForAck(in);
           sendDirectory(directory, in, out);
           out.write("E\n".getBytes());
  +        waitForAck(in);
       }
   
       private void sendFileToRemote(File localFile,
  @@ -200,6 +199,7 @@
               }
               out.flush();
               sendAck(out);
  +            waitForAck(in);
           } finally {
               long endTime = System.currentTimeMillis();
               logStats(startTime, endTime, totalLength);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message