diff options
author | Niclas Eklund <[email protected]> | 2010-02-01 14:53:39 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-02-01 16:06:10 +0100 |
commit | 766e91db470bc6d2c9473a73aa5f9e341a066df5 (patch) | |
tree | b109452de48d609d9a1f6ae05263e2d0d6dc328b /lib/ssh/src | |
parent | b043122391080a89766a8e9723044ff89b79a151 (diff) | |
download | otp-766e91db470bc6d2c9473a73aa5f9e341a066df5.tar.gz otp-766e91db470bc6d2c9473a73aa5f9e341a066df5.tar.bz2 otp-766e91db470bc6d2c9473a73aa5f9e341a066df5.zip |
In some cases SSH ceased to collect more data from the transport layer.
Diffstat (limited to 'lib/ssh/src')
-rw-r--r-- | lib/ssh/src/ssh.appup.src | 12 | ||||
-rw-r--r-- | lib/ssh/src/ssh_connection_handler.erl | 14 |
2 files changed, 15 insertions, 11 deletions
diff --git a/lib/ssh/src/ssh.appup.src b/lib/ssh/src/ssh.appup.src index 3bf772b42b..5329373862 100644 --- a/lib/ssh/src/ssh.appup.src +++ b/lib/ssh/src/ssh.appup.src @@ -1,24 +1,25 @@ %% %% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2004-2009. All Rights Reserved. -%% +%% +%% Copyright Ericsson AB 2004-2010. All Rights Reserved. +%% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this software. If not, it can be %% retrieved online at http://www.erlang.org/. -%% +%% %% Software distributed under the License is distributed on an "AS IS" %% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See %% the License for the specific language governing rights and limitations %% under the License. -%% +%% %% %CopyrightEnd% %% {"%VSN%", [ + {"1.1.7", [{load_module, ssh_connection_handler, soft_purge, soft_purge, []}]}, {"1.1.6", [{restart_application, ssh}]}, {"1.1.5", [{restart_application, ssh}]}, {"1.1.4", [{restart_application, ssh}]}, @@ -26,6 +27,7 @@ {"1.1.2", [{restart_application, ssh}]} ], [ + {"1.1.7", [{load_module, ssh_connection_handler, soft_purge, soft_purge, []}]}, {"1.1.6", [{restart_application, ssh}]}, {"1.1.5", [{restart_application, ssh}]}, {"1.1.4", [{restart_application, ssh}]}, diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl index 5240b4b4c5..822ef8f8f9 100644 --- a/lib/ssh/src/ssh_connection_handler.erl +++ b/lib/ssh/src/ssh_connection_handler.erl @@ -1,19 +1,19 @@ %% %% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2008-2009. All Rights Reserved. -%% +%% +%% Copyright Ericsson AB 2008-2010. All Rights Reserved. +%% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this software. If not, it can be %% retrieved online at http://www.erlang.org/. -%% +%% %% Software distributed under the License is distributed on an "AS IS" %% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See %% the License for the specific language governing rights and limitations %% under the License. -%% +%% %% %CopyrightEnd% %% %% @@ -530,6 +530,7 @@ handle_info({Protocol, Socket, Data}, Statename, case size(EncData0) + size(Data) >= max(8, BlockSize) of true -> {Ssh, SshPacketLen, DecData, EncData} = + ssh_transport:decrypt_first_block(<<EncData0/binary, Data/binary>>, Ssh0), case SshPacketLen > ?SSH_MAX_PACKET_SIZE of @@ -737,7 +738,8 @@ next_packet(#state{decoded_data_buffer = <<>>, State) when Buff =/= <<>> andalso size(Buff) >= 8 -> %% More data from the next packet has been received %% Fake a socket-recive message so that the data will be processed - self() ! {Protocol, Socket, <<>>} , + inet:setopts(Socket, [{active, once}]), + self() ! {Protocol, Socket, <<>>}, State; next_packet(#state{socket = Socket} = State) -> |