Browse Source

Fix the issue where scp transfer completion tracking wasn't being triggered for 100% completion

This closes #91 pull request at github/apache/ant
master
wenjingwang Jaikiran Pai 6 years ago
parent
commit
e91c4dc223
4 changed files with 12 additions and 4 deletions
  1. +1
    -0
      CONTRIBUTORS
  2. +4
    -0
      WHATSNEW
  3. +4
    -0
      contributors.xml
  4. +3
    -4
      src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java

+ 1
- 0
CONTRIBUTORS View File

@@ -441,6 +441,7 @@ Vladislav Bauer
Volker Leidl Volker Leidl
Waldek Herka Waldek Herka
Wang Weijun Wang Weijun
Wenjing Wang
Will Wang Will Wang
William Bernardet William Bernardet
William Ferguson William Ferguson


+ 4
- 0
WHATSNEW View File

@@ -56,6 +56,10 @@ Fixed bugs:
actual address could potentially be unreachable. This is now fixed actual address could potentially be unreachable. This is now fixed
and the resolved address is actually checked for reachability. and the resolved address is actually checked for reachability.


* Fixes an issue where scp transfer completion tracking wasn't being
triggered for 100% completion.
Github Pull Request #91



Other changes: Other changes:
-------------- --------------


+ 4
- 0
contributors.xml View File

@@ -1815,6 +1815,10 @@
<first>Wang</first> <first>Wang</first>
<last>Weijun</last> <last>Weijun</last>
</name> </name>
<name>
<first>Wenjing</first>
<last>Wang</last>
</name>
<name> <name>
<first>Will</first> <first>Will</first>
<last>Wang</last> <last>Wang</last>


+ 3
- 4
src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java View File

@@ -286,15 +286,14 @@ public class ScpFromMessage extends AbstractSshMessage {
fos.write(buf, 0, length); fos.write(buf, 0, length);
filesize -= length; filesize -= length;
totalLength += length; totalLength += length;
if (filesize == 0) {
break;
}

if (trackProgress) { if (trackProgress) {
percentTransmitted = trackProgress(initFilesize, percentTransmitted = trackProgress(initFilesize,
totalLength, totalLength,
percentTransmitted); percentTransmitted);
} }
if (filesize == 0) {
break;
}
} }
} finally { } finally {
final long endTime = System.currentTimeMillis(); final long endTime = System.currentTimeMillis();


Loading…
Cancel
Save