You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by lg...@apache.org on 2016/02/26 09:36:00 UTC
[3/5] mina-sshd git commit: Renamed SftpSubsystem methods that
implement hardlink@openssh.com extension to match other similar naming
convention
Renamed SftpSubsystem methods that implement hardlink@openssh.com extension to match other similar naming convention
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/0f5d1172
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/0f5d1172
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/0f5d1172
Branch: refs/heads/master
Commit: 0f5d1172fc39d46ae7d0ecc576fddb59f00f11a6
Parents: c37e81c
Author: Lyor Goldstein <ly...@gmail.com>
Authored: Fri Feb 26 10:35:26 2016 +0200
Committer: Lyor Goldstein <ly...@gmail.com>
Committed: Fri Feb 26 10:35:26 2016 +0200
----------------------------------------------------------------------
.../apache/sshd/server/subsystem/sftp/SftpSubsystem.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/0f5d1172/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystem.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystem.java b/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystem.java
index 6f4185b..40ff2a2 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystem.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystem.java
@@ -602,7 +602,7 @@ public class SftpSubsystem
doSpaceAvailable(buffer, id);
break;
case HardLinkExtensionParser.NAME:
- doHardLink(buffer, id);
+ doOpenSSHHardLink(buffer, id);
break;
default:
if (log.isDebugEnabled()) {
@@ -613,12 +613,13 @@ public class SftpSubsystem
}
}
- protected void doHardLink(Buffer buffer, int id) throws IOException {
+ // see https://github.com/openssh/openssh-portable/blob/master/PROTOCOL section 10
+ protected void doOpenSSHHardLink(Buffer buffer, int id) throws IOException {
String srcFile = buffer.getString();
String dstFile = buffer.getString();
try {
- doHardLink(id, srcFile, dstFile);
+ doOpenSSHHardLink(id, srcFile, dstFile);
} catch (IOException | RuntimeException e) {
sendStatus(BufferUtils.clear(buffer), id, e);
return;
@@ -627,9 +628,9 @@ public class SftpSubsystem
sendStatus(BufferUtils.clear(buffer), id, SftpConstants.SSH_FX_OK, "");
}
- protected void doHardLink(int id, String srcFile, String dstFile) throws IOException {
+ protected void doOpenSSHHardLink(int id, String srcFile, String dstFile) throws IOException {
if (log.isDebugEnabled()) {
- log.debug("doHardLink({})[id={}] SSH_FXP_EXTENDED[{}] (src={}, dst={})",
+ log.debug("doOpenSSHHardLink({})[id={}] SSH_FXP_EXTENDED[{}] (src={}, dst={})",
getServerSession(), id, HardLinkExtensionParser.NAME, srcFile, dstFile);
}