aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_sftp.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2018-06-25 15:00:35 +0200
committerHans Nilsson <[email protected]>2018-06-25 15:00:35 +0200
commit42901d90e4bdd44949a13488d228b77f0eda5aa9 (patch)
tree64f71539b2b6bb94c8815cd6c9615b5c0cdf41f5 /lib/ssh/src/ssh_sftp.erl
parent3fa9e059f48534044033484aa612c1ff4a65bcf3 (diff)
parentaa490b13a7f98e54c48fea3537f02614f1145ffc (diff)
downloadotp-42901d90e4bdd44949a13488d228b77f0eda5aa9.tar.gz
otp-42901d90e4bdd44949a13488d228b77f0eda5aa9.tar.bz2
otp-42901d90e4bdd44949a13488d228b77f0eda5aa9.zip
Merge branch 'maint-20' into maint
* maint-20: Updated OTP version Prepare release ssh: Report the signal name if there is an exit-signal to sftpd ssh: Bug fix sftp error codes ssh: Fix ssh_xfer decode_ATTR error for Vsn=4 syntax_tools: Fix a bug regarding reverting map types. Conflicts: OTP_VERSION lib/inets/doc/src/notes.xml lib/inets/vsn.mk lib/ssh/doc/src/notes.xml lib/ssh/vsn.mk lib/syntax_tools/doc/src/notes.xml lib/syntax_tools/vsn.mk otp_versions.table
Diffstat (limited to 'lib/ssh/src/ssh_sftp.erl')
-rw-r--r--lib/ssh/src/ssh_sftp.erl13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/ssh/src/ssh_sftp.erl b/lib/ssh/src/ssh_sftp.erl
index 6e720a47b7..1b2ba5a50b 100644
--- a/lib/ssh/src/ssh_sftp.erl
+++ b/lib/ssh/src/ssh_sftp.erl
@@ -798,13 +798,22 @@ handle_ssh_msg({ssh_cm, _, {signal, _, _}}, State) ->
%% Ignore signals according to RFC 4254 section 6.9.
{ok, State};
-handle_ssh_msg({ssh_cm, _, {exit_signal, ChannelId, _, Error, _}},
+handle_ssh_msg({ssh_cm, _, {exit_signal, ChannelId, Signal, Error0, _}},
State0) ->
+ Error =
+ case Error0 of
+ "" -> Signal;
+ _ -> Error0
+ end,
State = reply_all(State0, {error, Error}),
{stop, ChannelId, State};
handle_ssh_msg({ssh_cm, _, {exit_status, ChannelId, Status}}, State0) ->
- State = reply_all(State0, {error, {exit_status, Status}}),
+ State =
+ case State0 of
+ 0 -> State0;
+ _ -> reply_all(State0, {error, {exit_status, Status}})
+ end,
{stop, ChannelId, State}.
%%--------------------------------------------------------------------