diff options
author | Niclas Eklund <[email protected]> | 2010-07-13 12:00:00 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-08-23 14:12:38 +0200 |
commit | ab325a413370057ecf142448dffea56d28616f47 (patch) | |
tree | 94dc57ba16782030d9cb9bf876b973378ccff972 /lib/ssh/src | |
parent | cc621c57ce7c41c2b46a103136575bca445aedd0 (diff) | |
download | otp-ab325a413370057ecf142448dffea56d28616f47.tar.gz otp-ab325a413370057ecf142448dffea56d28616f47.tar.bz2 otp-ab325a413370057ecf142448dffea56d28616f47.zip |
ssh: Patch 1127
OTP-8735 SSH in some cases generated a crash report when a channel
was closed in a normal way.
Diffstat (limited to 'lib/ssh/src')
-rw-r--r-- | lib/ssh/src/ssh.appup.src | 16 | ||||
-rw-r--r-- | lib/ssh/src/ssh_connection_manager.erl | 16 |
2 files changed, 21 insertions, 11 deletions
diff --git a/lib/ssh/src/ssh.appup.src b/lib/ssh/src/ssh.appup.src index 1042355112..82114c9afd 100644 --- a/lib/ssh/src/ssh.appup.src +++ b/lib/ssh/src/ssh.appup.src @@ -1,25 +1,27 @@ %% %% %CopyrightBegin% -%% +%% %% 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.9", [{load_module, ssh_channel, soft_purge, soft_purge, []}]}, + {"1.1.10", [{load_module, ssh_connection_manager, soft_purge, soft_purge, []}]}, + {"1.1.9", [{load_module, ssh_channel, soft_purge, soft_purge, []}, + {load_module, ssh_connection_manager, soft_purge, soft_purge, []}]}, {"1.1.8", [{restart_application, ssh}]}, {"1.1.7", [{restart_application, ssh}]}, {"1.1.6", [{restart_application, ssh}]}, @@ -29,7 +31,9 @@ {"1.1.2", [{restart_application, ssh}]} ], [ - {"1.1.9", [{load_module, ssh_channel, soft_purge, soft_purge, []}]}, + {"1.1.10", [{load_module, ssh_connection_manager, soft_purge, soft_purge, []}]}, + {"1.1.9", [{load_module, ssh_channel, soft_purge, soft_purge, []}, + {load_module, ssh_connection_manager, soft_purge, soft_purge, []}]}, {"1.1.8", [{restart_application, ssh}]}, {"1.1.7", [{restart_application, ssh}]}, {"1.1.6", [{restart_application, ssh}]}, diff --git a/lib/ssh/src/ssh_connection_manager.erl b/lib/ssh/src/ssh_connection_manager.erl index cffeade485..9e55312e5f 100644 --- a/lib/ssh/src/ssh_connection_manager.erl +++ b/lib/ssh/src/ssh_connection_manager.erl @@ -1,19 +1,19 @@ %% %% %CopyrightBegin% -%% +%% %% 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% %% %% @@ -146,6 +146,8 @@ adjust_window(ConnectionManager, Channel, Bytes) -> close(ConnectionManager, ChannelId) -> try call(ConnectionManager, {close, ChannelId}) of ok -> + ok; + {error,normal} -> ok catch exit:{noproc, _} -> @@ -155,6 +157,8 @@ close(ConnectionManager, ChannelId) -> stop(ConnectionManager) -> try call(ConnectionManager, stop) of ok -> + ok; + {error,normal} -> ok catch exit:{noproc, _} -> @@ -593,7 +597,9 @@ call(Pid, Msg, Timeout) -> Result catch exit:{timeout, _} -> - {error, timeout} + {error, timeout}; + exit:{normal, _} -> + {error, normal} end. cast(Pid, Msg) -> |