aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2017-03-06 16:24:03 +0100
committerHans Nilsson <[email protected]>2017-03-09 17:43:16 +0100
commit1af346afd2d8cabc48bf9673dc62672e36b7b8a2 (patch)
treec4fc4a3a2f5cbc7e803bef8f15eadd1102d568a9
parentce6040f651c081f4cb7dfafe5c4bf49bfee7812f (diff)
downloadotp-1af346afd2d8cabc48bf9673dc62672e36b7b8a2.tar.gz
otp-1af346afd2d8cabc48bf9673dc62672e36b7b8a2.tar.bz2
otp-1af346afd2d8cabc48bf9673dc62672e36b7b8a2.zip
ssh: Host and Profile info returned in ssh:daemon_info
-rw-r--r--lib/ssh/src/ssh.erl10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/ssh/src/ssh.erl b/lib/ssh/src/ssh.erl
index 53aba14458..e2a289d737 100644
--- a/lib/ssh/src/ssh.erl
+++ b/lib/ssh/src/ssh.erl
@@ -200,11 +200,13 @@ daemon(Host0, Port, UserOptions0) ->
daemon_info(Pid) ->
case catch ssh_system_sup:acceptor_supervisor(Pid) of
AsupPid when is_pid(AsupPid) ->
- [Port] =
- [Prt || {{ssh_acceptor_sup,any,Prt,default},
+ [{ListenAddr,Port,Profile}] =
+ [{LA,Prt,Prf} || {{ssh_acceptor_sup,LA,Prt,Prf},
_WorkerPid,worker,[ssh_acceptor]} <- supervisor:which_children(AsupPid)],
- {ok, [{port,Port}]};
-
+ {ok, [{port,Port},
+ {listen_address,ListenAddr},
+ {profile,Profile}
+ ]};
_ ->
{error,bad_daemon_ref}
end.