aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_channel.erl
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2014-10-23 11:30:40 +0200
committerHenrik Nord <[email protected]>2014-10-23 11:30:40 +0200
commit9f0477e13bb8819ee252d2b8834c1411f02a9cb8 (patch)
tree6373cd013fc3ff1220b3845a8e50230d8105c04c /lib/ssh/src/ssh_channel.erl
parente97f9bc1672cb2d2c07d4133030528b43b26532c (diff)
parent461757503e8ecaaeb3ea9b84f5c0dfccd3408694 (diff)
downloadotp-9f0477e13bb8819ee252d2b8834c1411f02a9cb8.tar.gz
otp-9f0477e13bb8819ee252d2b8834c1411f02a9cb8.tar.bz2
otp-9f0477e13bb8819ee252d2b8834c1411f02a9cb8.zip
Merge branch 'maint-17' into maint
Conflicts: OTP_VERSION
Diffstat (limited to 'lib/ssh/src/ssh_channel.erl')
-rw-r--r--lib/ssh/src/ssh_channel.erl14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/ssh/src/ssh_channel.erl b/lib/ssh/src/ssh_channel.erl
index 508ae637cf..5c24f362b1 100644
--- a/lib/ssh/src/ssh_channel.erl
+++ b/lib/ssh/src/ssh_channel.erl
@@ -67,7 +67,8 @@
%% Internal application API
-export([cache_create/0, cache_lookup/2, cache_update/2,
cache_delete/1, cache_delete/2, cache_foldl/3,
- cache_find/2]).
+ cache_find/2,
+ get_print_info/1]).
-record(state, {
cm,
@@ -190,6 +191,14 @@ init([Options]) ->
%% {stop, Reason, State}
%% Description: Handling call messages
%%--------------------------------------------------------------------
+handle_call(get_print_info, _From, State) ->
+ Reply =
+ {{State#state.cm,
+ State#state.channel_id},
+ io_lib:format('CB=~p',[State#state.channel_cb])
+ },
+ {reply, Reply, State};
+
handle_call(Request, From, #state{channel_cb = Module,
channel_state = ChannelState} = State) ->
try Module:handle_call(Request, From, ChannelState) of
@@ -333,6 +342,9 @@ cache_find(ChannelPid, Cache) ->
Channel
end.
+get_print_info(Pid) ->
+ call(Pid, get_print_info, 1000).
+
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------