You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by gn...@apache.org on 2013/11/29 20:24:45 UTC

git commit: [SSHD-255] sshd does not always? reply to requests with 'want reply'

Updated Branches:
  refs/heads/master 46ea09302 -> 49ba56e1a


[SSHD-255] sshd does not always? reply to requests with 'want reply'

Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/49ba56e1
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/49ba56e1
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/49ba56e1

Branch: refs/heads/master
Commit: 49ba56e1a39c085ce7cf34f39d361b07f6c2bf46
Parents: 46ea093
Author: Guillaume Nodet <gn...@apache.org>
Authored: Fri Nov 29 20:24:25 2013 +0100
Committer: Guillaume Nodet <gn...@apache.org>
Committed: Fri Nov 29 20:24:25 2013 +0100

----------------------------------------------------------------------
 .../java/org/apache/sshd/server/channel/ChannelSession.java    | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/49ba56e1/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelSession.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelSession.java b/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelSession.java
index 31b87d7..a2a1128 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelSession.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelSession.java
@@ -313,6 +313,12 @@ public class ChannelSession extends AbstractServerChannel {
         if (type != null && type.endsWith("@putty.projects.tartarus.org")) {
             // Ignore but accept, more doc at
             // http://tartarus.org/~simon/putty-snapshots/htmldoc/AppendixF.html
+            boolean wantReply = buffer.getBoolean();
+            if (wantReply) {
+                buffer = session.createBuffer(SshConstants.Message.SSH_MSG_CHANNEL_FAILURE, 0);
+                buffer.putInt(recipient);
+                writePacket(buffer);
+            }
             return true;
         }
         return false;