X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-netty-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fnettyutil%2Fhandler%2Fssh%2Fclient%2FSshSession.java;h=9cdc5926f042fcdc30129257597113c532581e9e;hp=44893b879431fe738e40e91ea26c88c7b9c6009d;hb=83f7f24d355f87d8c1a850098d5b7c82e5d746dd;hpb=17d82f582a6bc13c78be3b19954ff8c021180e93 diff --git a/opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/client/SshSession.java b/opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/client/SshSession.java index 44893b8794..9cdc5926f0 100644 --- a/opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/client/SshSession.java +++ b/opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/client/SshSession.java @@ -9,8 +9,6 @@ package org.opendaylight.controller.netconf.nettyutil.handler.ssh.client; import ch.ethz.ssh2.Session; -import ch.ethz.ssh2.StreamGobbler; - import ch.ethz.ssh2.channel.Channel; import java.io.Closeable; import java.io.IOException; @@ -23,19 +21,20 @@ import java.io.OutputStream; class SshSession implements Closeable { private final Session session; - public SshSession(Session session) { + public SshSession(final Session session) { this.session = session; } - - public void startSubSystem(String name) throws IOException { + public void startSubSystem(final String name) throws IOException { session.startSubSystem(name); } public InputStream getStdout() { - return new StreamGobbler(session.getStdout()); + return session.getStdout(); } + // FIXME according to http://www.ganymed.ethz.ch/ssh2/FAQ.html#blocking you should read data from both stdout and stderr to prevent window filling up (since stdout and stderr share a window) + // FIXME stdErr is not used anywhere public InputStream getStderr() { return session.getStderr(); }