aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_connection.erl
diff options
context:
space:
mode:
authorStefan Zegenhagen <[email protected]>2012-07-20 11:38:57 +0200
committerHenrik Nord <[email protected]>2012-10-05 11:14:59 +0200
commit54fad6dbeb96ee9f6b70723289bd4971a8b0e0f9 (patch)
tree088abb83714215f87a6eceb36e42e9bb6def151e /lib/ssh/src/ssh_connection.erl
parenta24c49aec663f19092cf0d2062af19523666d291 (diff)
downloadotp-54fad6dbeb96ee9f6b70723289bd4971a8b0e0f9.tar.gz
otp-54fad6dbeb96ee9f6b70723289bd4971a8b0e0f9.tar.bz2
otp-54fad6dbeb96ee9f6b70723289bd4971a8b0e0f9.zip
Improve interoperability with SSH clients
This patch fixes a few problems of the SSH shell server that affect the interoperability with SSH clients in widespread use. First problem is that, whenever a channel_request message is received with want_reply=true, the reply ends up being sent to the servers channel id, not the clients channel id. This causes the client to terminate the connection. The easiest solution to the problem appears to be a new function in ssh_connection_manager.erl that translates the servers channel id before sending the reply (in the same manner as other functions do it). Second problem is in ssh_cli.erl. When an SSH client sends a window_change request between PTY allocation and starting the shell (which appears to happen with some clients), ssh_cli.erl crashes because #state.buf is yet 'undefined'. Allocating an empty buffer at PTY allocation time solves the problem. Affected SSH clients: - all clients based on SSH-2.0-TrileadSSH2Java_213 (problem #1) - SSH Term Pro (problem #2)
Diffstat (limited to 'lib/ssh/src/ssh_connection.erl')
-rw-r--r--lib/ssh/src/ssh_connection.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ssh/src/ssh_connection.erl b/lib/ssh/src/ssh_connection.erl
index 240d7f70d1..9424cdd423 100644
--- a/lib/ssh/src/ssh_connection.erl
+++ b/lib/ssh/src/ssh_connection.erl
@@ -177,7 +177,7 @@ close(ConnectionManager, ChannelId) ->
%% Description: Send status replies to requests that want such replies.
%%--------------------------------------------------------------------
reply_request(ConnectionManager, true, Status, ChannelId) ->
- ConnectionManager ! {ssh_cm, self(), {Status, ChannelId}},
+ ssh_connection_manager:reply_request(ConnectionManager, Status, ChannelId),
ok;
reply_request(_,false, _, _) ->
ok.