diff options
author | Ingela Anderton Andin <[email protected]> | 2015-06-08 16:00:49 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2015-06-08 16:00:49 +0200 |
commit | 798219edd8adf36dbcc02ce9c9de71685da85d64 (patch) | |
tree | 96352c5735cb056464cf758fcee42eb990cbe62e /lib/ssh/src/ssh_acceptor.erl | |
parent | a0e14d9c307cd4d1ae964171ff0812bad0a94ef0 (diff) | |
parent | 9a6662bd15c03a9607d328b5efbaf592a4205574 (diff) | |
download | otp-798219edd8adf36dbcc02ce9c9de71685da85d64.tar.gz otp-798219edd8adf36dbcc02ce9c9de71685da85d64.tar.bz2 otp-798219edd8adf36dbcc02ce9c9de71685da85d64.zip |
Merge branch 'ia/ssh/name-spaces/OTP-12675'
* ia/ssh/name-spaces/OTP-12675:
ssh: Correct Makefile
ssh: Add profile option
Diffstat (limited to 'lib/ssh/src/ssh_acceptor.erl')
-rw-r--r-- | lib/ssh/src/ssh_acceptor.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ssh/src/ssh_acceptor.erl b/lib/ssh/src/ssh_acceptor.erl index 34988f17b6..6c431af270 100644 --- a/lib/ssh/src/ssh_acceptor.erl +++ b/lib/ssh/src/ssh_acceptor.erl @@ -21,6 +21,8 @@ -module(ssh_acceptor). +-include("ssh.hrl"). + %% Internal application API -export([start_link/5, number_of_connections/1]). @@ -82,8 +84,10 @@ acceptor_loop(Callback, Port, Address, Opts, ListenSocket, AcceptTimeout) -> end. handle_connection(Callback, Address, Port, Options, Socket) -> - SystemSup = ssh_system_sup:system_supervisor(Address, Port), SSHopts = proplists:get_value(ssh_opts, Options, []), + Profile = proplists:get_value(profile, SSHopts, ?DEFAULT_PROFILE), + SystemSup = ssh_system_sup:system_supervisor(Address, Port, Profile), + MaxSessions = proplists:get_value(max_sessions,SSHopts,infinity), case number_of_connections(SystemSup) < MaxSessions of true -> |