|
|
@@ -221,7 +221,9 @@ public class ScpToMessage extends AbstractSshMessage { |
|
|
int percentTransmitted = 0; |
|
|
int percentTransmitted = 0; |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
log("Sending: " + localFile.getName() + " : " + localFile.length()); |
|
|
|
|
|
|
|
|
if (this.getVerbose()) { |
|
|
|
|
|
log("Sending: " + localFile.getName() + " : " + localFile.length()); |
|
|
|
|
|
} |
|
|
while (true) { |
|
|
while (true) { |
|
|
int len = fis.read(buf, 0, buf.length); |
|
|
int len = fis.read(buf, 0, buf.length); |
|
|
if (len <= 0) { |
|
|
if (len <= 0) { |
|
|
@@ -240,8 +242,10 @@ public class ScpToMessage extends AbstractSshMessage { |
|
|
sendAck(out); |
|
|
sendAck(out); |
|
|
waitForAck(in); |
|
|
waitForAck(in); |
|
|
} finally { |
|
|
} finally { |
|
|
long endTime = System.currentTimeMillis(); |
|
|
|
|
|
logStats(startTime, endTime, totalLength); |
|
|
|
|
|
|
|
|
if (this.getVerbose()) { |
|
|
|
|
|
long endTime = System.currentTimeMillis(); |
|
|
|
|
|
logStats(startTime, endTime, totalLength); |
|
|
|
|
|
} |
|
|
fis.close(); |
|
|
fis.close(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|