diff options
author | Hans Nilsson <[email protected]> | 2017-04-06 19:31:13 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2017-04-07 10:19:56 +0200 |
commit | 4d6393bc4df58defbc22c5d97e28bbfdd8794fc6 (patch) | |
tree | 37f2957737075a567d05412e9ff0156a88c6182e /lib/ssh/src/ssh_connection_handler.erl | |
parent | 3bbb2c9d5f92205f91cc68b9cebe263b84afe3e2 (diff) | |
download | otp-4d6393bc4df58defbc22c5d97e28bbfdd8794fc6.tar.gz otp-4d6393bc4df58defbc22c5d97e28bbfdd8794fc6.tar.bz2 otp-4d6393bc4df58defbc22c5d97e28bbfdd8794fc6.zip |
ssh: Lazy default in get options macro
Diffstat (limited to 'lib/ssh/src/ssh_connection_handler.erl')
-rw-r--r-- | lib/ssh/src/ssh_connection_handler.erl | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl index 5a13209ae3..50a29bbb53 100644 --- a/lib/ssh/src/ssh_connection_handler.erl +++ b/lib/ssh/src/ssh_connection_handler.erl @@ -413,14 +413,8 @@ init_connection(server, C = #connection{}, Opts) -> SubSystemSup = proplists:get_value(subsystem_sup, Sups), ConnectionSup = proplists:get_value(connection_sup, Sups), - Shell = ?GET_OPT(shell, Opts), - Exec = ?GET_OPT(exec, Opts), - CliSpec = case ?GET_OPT(ssh_cli, Opts) of - undefined -> {ssh_cli, [Shell]}; - Spec -> Spec - end, - C#connection{cli_spec = CliSpec, - exec = Exec, + C#connection{cli_spec = ?GET_OPT(ssh_cli, Opts, {ssh_cli,[?GET_OPT(shell, Opts)]}), + exec = ?GET_OPT(exec, Opts), system_supervisor = SystemSup, sub_system_supervisor = SubSystemSup, connection_supervisor = ConnectionSup |