diff options
author | Erlang/OTP <[email protected]> | 2014-10-23 10:53:04 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2014-10-23 10:53:04 +0200 |
commit | c530f3d4f851ab3844b67e4ccfbe724910bed4bd (patch) | |
tree | 64cabc24e1492c4efe434f7ef120561bc630dac4 /lib/ssh/src/ssh_channel.erl | |
parent | 5d49d05c3604f764736b10cfb287818d4b41efda (diff) | |
parent | b7f24722a7346ae48b2d8d7a29dea9d381e669b7 (diff) | |
download | otp-c530f3d4f851ab3844b67e4ccfbe724910bed4bd.tar.gz otp-c530f3d4f851ab3844b67e4ccfbe724910bed4bd.tar.bz2 otp-c530f3d4f851ab3844b67e4ccfbe724910bed4bd.zip |
Merge branch 'hans/ssh/scanning/OTP-12247' into maint-17
* hans/ssh/scanning/OTP-12247:
ssh: fix ssh.appup.src.
ssh: Corrected appup
ssh: fix .app and .appup errors
ssh: remove supervisors for crashed connection worker
ssh: Print supervisor tree (on demand).
ssh: prepare for release
ssh: avoid terminated but not deleted children to be counted.
ssh: simple info function (ssh_info:print/0).
ssh: Gracefully handle bad handshake messages
ssh: reduce amount of printouts
ssh: Fix port scanner problems
Diffstat (limited to 'lib/ssh/src/ssh_channel.erl')
-rw-r--r-- | lib/ssh/src/ssh_channel.erl | 14 |
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 %%-------------------------------------------------------------------- |