aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2014-10-09 12:35:03 +0200
committerHans Nilsson <[email protected]>2014-10-09 12:35:03 +0200
commitd086394ebd3595d431835af80709977a6c1c7c89 (patch)
tree61a51edb992117f6eb50b816c58e641ffbe8968f /lib/ssh
parentebf50edd510a5beafa466741e10437f9ebad4408 (diff)
downloadotp-d086394ebd3595d431835af80709977a6c1c7c89.tar.gz
otp-d086394ebd3595d431835af80709977a6c1c7c89.tar.bz2
otp-d086394ebd3595d431835af80709977a6c1c7c89.zip
ssh: Corrected ret val from ssh_connection:subsystem/4.
Diffstat (limited to 'lib/ssh')
-rw-r--r--lib/ssh/src/ssh_connection.erl12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/ssh/src/ssh_connection.erl b/lib/ssh/src/ssh_connection.erl
index 33849f4527..87f37b93ef 100644
--- a/lib/ssh/src/ssh_connection.erl
+++ b/lib/ssh/src/ssh_connection.erl
@@ -107,9 +107,15 @@ shell(ConnectionHandler, ChannelId) ->
%% Description: Executes a predefined subsystem.
%%--------------------------------------------------------------------
subsystem(ConnectionHandler, ChannelId, SubSystem, TimeOut) ->
- ssh_connection_handler:request(ConnectionHandler, self(),
- ChannelId, "subsystem",
- true, [?string(SubSystem)], TimeOut).
+ case ssh_connection_handler:request(ConnectionHandler, self(),
+ ChannelId, "subsystem",
+ true, [?string(SubSystem)], TimeOut) of
+ success -> success;
+ failure -> failure;
+ {error,timeout} -> {error,timeout};
+ _ -> failure
+ end.
+
%%--------------------------------------------------------------------
-spec send(pid(), channel_id(), iodata()) ->
ok | {error, closed}.