From 70f3aeee683092388d2a01ba019942701f5ae1ce Mon Sep 17 00:00:00 2001 From: shikhar Date: Thu, 30 Dec 2010 22:38:02 +0000 Subject: [PATCH] SessionChannel should override notifyError() in order to notify the stderr stream --- .../channel/direct/SessionChannel.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/schmizz/sshj/connection/channel/direct/SessionChannel.java b/src/main/java/net/schmizz/sshj/connection/channel/direct/SessionChannel.java index 83492f4a..5e50bccb 100644 --- a/src/main/java/net/schmizz/sshj/connection/channel/direct/SessionChannel.java +++ b/src/main/java/net/schmizz/sshj/connection/channel/direct/SessionChannel.java @@ -35,10 +35,7 @@ */ package net.schmizz.sshj.connection.channel.direct; -import net.schmizz.sshj.common.Buffer; -import net.schmizz.sshj.common.IOUtils; -import net.schmizz.sshj.common.SSHPacket; -import net.schmizz.sshj.common.StreamCopier; +import net.schmizz.sshj.common.*; import net.schmizz.sshj.connection.Connection; import net.schmizz.sshj.connection.ConnectionException; import net.schmizz.sshj.connection.channel.ChannelInputStream; @@ -50,7 +47,9 @@ import java.util.Collections; import java.util.Map; import java.util.concurrent.TimeUnit; -/** {@link Session} implementation. */ +/** + * {@link Session} implementation. + */ public class SessionChannel extends AbstractDirectChannel @@ -171,7 +170,7 @@ public class @Override public void reqX11Forwarding(String authProto, String authCookie, int screen) throws ConnectionException, - TransportException { + TransportException { sendChannelRequest( "x11-req", true, @@ -238,4 +237,10 @@ public class super.gotExtendedData(dataTypeCode, buf); } + @Override + public void notifyError(SSHException error) { + err.notifyError(error); + super.notifyError(error); + } + } \ No newline at end of file