aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_info.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2015-06-09 18:19:12 +0200
committerHans Nilsson <[email protected]>2015-06-15 12:03:58 +0200
commit9ba9728528f309933fd95aa92f748682dd5204f2 (patch)
tree15f517f11a9b089b5b1cb26275cf4e3c0f369407 /lib/ssh/src/ssh_info.erl
parent455ae616947dce6bd6b514226e98b50ef176fd83 (diff)
downloadotp-9ba9728528f309933fd95aa92f748682dd5204f2.tar.gz
otp-9ba9728528f309933fd95aa92f748682dd5204f2.tar.bz2
otp-9ba9728528f309933fd95aa92f748682dd5204f2.zip
ssh: add test case + corr for ssh_info:print/1
Conflicts: lib/ssh/test/ssh_basic_SUITE.erl
Diffstat (limited to 'lib/ssh/src/ssh_info.erl')
-rw-r--r--lib/ssh/src/ssh_info.erl9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/ssh/src/ssh_info.erl b/lib/ssh/src/ssh_info.erl
index 9c79d773a7..fc8f564bc3 100644
--- a/lib/ssh/src/ssh_info.erl
+++ b/lib/ssh/src/ssh_info.erl
@@ -79,7 +79,7 @@ print_clients(D) ->
print_client(D, {undefined,Pid,supervisor,[ssh_connection_handler]}) ->
{{Local,Remote},_Str} = ssh_connection_handler:get_print_info(Pid),
- io:format(D, " Local=~s Remote=~s~n",[fmt_host_port(Local),fmt_host_port(Remote)]);
+ io:format(D, " Local=~s Remote=~s ConnectionRef=~p~n",[fmt_host_port(Local),fmt_host_port(Remote),Pid]);
print_client(D, Other) ->
io:format(D, " [[Other 1: ~p]]~n",[Other]).
@@ -134,10 +134,11 @@ walk_sups(D, StartPid) ->
io:format(D, "Start at ~p, ~s.~n",[StartPid,dead_or_alive(StartPid)]),
walk_sups(D, children(StartPid), _Indent=?inc(0)).
-walk_sups(D, [H={_,Pid,SupOrWorker,_}|T], Indent) ->
+walk_sups(D, [H={_,Pid,_,_}|T], Indent) ->
indent(D, Indent), io:format(D, '~200p ~p is ~s~n',[H,Pid,dead_or_alive(Pid)]),
- case SupOrWorker of
- supervisor -> walk_sups(D, children(Pid), ?inc(Indent));
+ case H of
+ {_,_,supervisor,[ssh_connection_handler]} -> ok;
+ {_,Pid,supervisor,_} -> walk_sups(D, children(Pid), ?inc(Indent));
_ -> ok
end,
walk_sups(D, T, Indent);