From 766e91db470bc6d2c9473a73aa5f9e341a066df5 Mon Sep 17 00:00:00 2001 From: Niclas Eklund Date: Mon, 1 Feb 2010 14:53:39 +0000 Subject: In some cases SSH ceased to collect more data from the transport layer. --- lib/ssh/doc/src/notes.xml | 17 ++++++++++++++--- lib/ssh/src/ssh.appup.src | 12 +++++++----- lib/ssh/src/ssh_connection_handler.erl | 14 ++++++++------ lib/ssh/vsn.mk | 3 ++- 4 files changed, 31 insertions(+), 15 deletions(-) diff --git a/lib/ssh/doc/src/notes.xml b/lib/ssh/doc/src/notes.xml index ef49bb8b3d..9597137cdf 100644 --- a/lib/ssh/doc/src/notes.xml +++ b/lib/ssh/doc/src/notes.xml @@ -4,7 +4,7 @@
- 20042009 + 20042010 Ericsson AB. All Rights Reserved. @@ -13,12 +13,12 @@ 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. - + SSH Release Notes @@ -31,6 +31,17 @@
Ssh 1.1.8 +
Fixed Bugs and Malfunctions + + +

+ In some cases SSH ceased to collect more data from the transport layer.

+

+ Own Id: OTP-8401 Aux Id: seq11479

+
+
+
+
Improvements and New Features 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(<>, 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) -> diff --git a/lib/ssh/vsn.mk b/lib/ssh/vsn.mk index 2b9df4ae60..bc7bceeb24 100644 --- a/lib/ssh/vsn.mk +++ b/lib/ssh/vsn.mk @@ -3,7 +3,8 @@ SSH_VSN = 1.1.8 APP_VSN = "ssh-$(SSH_VSN)" -TICKETS = OTP-8356 +TICKETS = OTP-8356 \ + OTP-8401 TICKETS_1.1.7 = OTP-8121 \ OTP-8277 \ -- cgit v1.2.3