|
@@ -113,7 +113,6 @@ public class ScpToMessage extends AbstractSshMessage { |
|
|
|
|
|
|
|
|
waitForAck(in); |
|
|
waitForAck(in); |
|
|
sendFileToRemote(localFile, in, out); |
|
|
sendFileToRemote(localFile, in, out); |
|
|
waitForAck(in); |
|
|
|
|
|
} finally { |
|
|
} finally { |
|
|
if (channel != null) { |
|
|
if (channel != null) { |
|
|
channel.disconnect(); |
|
|
channel.disconnect(); |
|
@@ -134,7 +133,6 @@ public class ScpToMessage extends AbstractSshMessage { |
|
|
Directory current = (Directory) i.next(); |
|
|
Directory current = (Directory) i.next(); |
|
|
sendDirectory(current, in, out); |
|
|
sendDirectory(current, in, out); |
|
|
} |
|
|
} |
|
|
waitForAck(in); |
|
|
|
|
|
} finally { |
|
|
} finally { |
|
|
if (channel != null) { |
|
|
if (channel != null) { |
|
|
channel.disconnect(); |
|
|
channel.disconnect(); |
|
@@ -167,6 +165,7 @@ public class ScpToMessage extends AbstractSshMessage { |
|
|
waitForAck(in); |
|
|
waitForAck(in); |
|
|
sendDirectory(directory, in, out); |
|
|
sendDirectory(directory, in, out); |
|
|
out.write("E\n".getBytes()); |
|
|
out.write("E\n".getBytes()); |
|
|
|
|
|
waitForAck(in); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void sendFileToRemote(File localFile, |
|
|
private void sendFileToRemote(File localFile, |
|
@@ -200,6 +199,7 @@ public class ScpToMessage extends AbstractSshMessage { |
|
|
} |
|
|
} |
|
|
out.flush(); |
|
|
out.flush(); |
|
|
sendAck(out); |
|
|
sendAck(out); |
|
|
|
|
|
waitForAck(in); |
|
|
} finally { |
|
|
} finally { |
|
|
long endTime = System.currentTimeMillis(); |
|
|
long endTime = System.currentTimeMillis(); |
|
|
logStats(startTime, endTime, totalLength); |
|
|
logStats(startTime, endTime, totalLength); |
|
|