aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_daemon_channel.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2018-04-25 15:51:03 +0200
committerHans Nilsson <[email protected]>2018-04-27 10:30:25 +0200
commit8b50978cdc82d404f68384e1aadf7685a9d86af4 (patch)
treef2c9b6f1942c4baaea7f783079152526639f52b0 /lib/ssh/src/ssh_daemon_channel.erl
parent867e9db15f3d3e5e430e3adda577364e455b9dac (diff)
downloadotp-8b50978cdc82d404f68384e1aadf7685a9d86af4.tar.gz
otp-8b50978cdc82d404f68384e1aadf7685a9d86af4.tar.bz2
otp-8b50978cdc82d404f68384e1aadf7685a9d86af4.zip
ssh: Use ssh_daemon_channel_sup and ssh_damon_channel
Diffstat (limited to 'lib/ssh/src/ssh_daemon_channel.erl')
-rw-r--r--lib/ssh/src/ssh_daemon_channel.erl29
1 files changed, 7 insertions, 22 deletions
diff --git a/lib/ssh/src/ssh_daemon_channel.erl b/lib/ssh/src/ssh_daemon_channel.erl
index 72853f2d6a..e1d6906bbc 100644
--- a/lib/ssh/src/ssh_daemon_channel.erl
+++ b/lib/ssh/src/ssh_daemon_channel.erl
@@ -25,7 +25,7 @@
-module(ssh_daemon_channel).
-%% API to special server side channel that can be pluged into the erlang ssh daemeon
+%% API to server side channel that can be pluged into the erlang ssh daemeon
-callback init(Args :: term()) ->
{ok, State :: term()} | {ok, State :: term(), timeout() | hibernate} |
{stop, Reason :: term()} | ignore.
@@ -42,29 +42,14 @@
{stop, ChannelId::ssh:channel_id(),
State::term()}.
-%%% API
--export([start/4, start/5, start_link/4, start_link/5, enter_loop/1]).
-
-%% gen_server callbacks
--export([init/1, terminate/2]).
-
--spec start(ssh:connection_ref(), ssh:channel_id(), atom(), term()) -> term().
-start(ConnectionManager, ChannelId, CallBack, CbInitArgs) ->
- ssh_channel:start(ConnectionManager, ChannelId, CallBack, CbInitArgs, undefined).
-
-start(ConnectionManager, ChannelId, CallBack, CbInitArgs, Exec) ->
- ssh_channel:start(ConnectionManager, ChannelId, CallBack, CbInitArgs, Exec).
-
-start_link(ConnectionManager, ChannelId, CallBack, CbInitArgs) ->
- ssh_channel:start_link(ConnectionManager, ChannelId, CallBack, CbInitArgs, undefined).
+%%% Internal API
+-export([start_link/5,
+ get_print_info/1
+ ]).
start_link(ConnectionManager, ChannelId, CallBack, CbInitArgs, Exec) ->
ssh_channel:start_link(ConnectionManager, ChannelId, CallBack, CbInitArgs, Exec).
-enter_loop(State) ->
- ssh_channel:enter_loop(State).
-init(Args) ->
- ssh_channel:init(Args).
-terminate(Reason, State) ->
- ssh_channel:terminate(Reason, State).
+get_print_info(Pid) ->
+ ssh_channel:get_print_info(Pid).