diff options
author | Ingela Anderton Andin <[email protected]> | 2016-02-25 11:44:13 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2016-02-25 11:44:13 +0100 |
commit | 87ed3fe4d7ddbc3c64d182032e9fe054600cf5ba (patch) | |
tree | 4d717a93b03c7ec5b24bc588ae96af25dccfb134 /lib/ssl/src/ssl.erl | |
parent | 930996a0613b841a0d026100e5b4659d5269e80c (diff) | |
parent | df597b37df56c78383601135bab16a46739d8c86 (diff) | |
download | otp-87ed3fe4d7ddbc3c64d182032e9fe054600cf5ba.tar.gz otp-87ed3fe4d7ddbc3c64d182032e9fe054600cf5ba.tar.bz2 otp-87ed3fe4d7ddbc3c64d182032e9fe054600cf5ba.zip |
Merge branch 'legoscia/fix-ssl-example/PR-976/OTP-13363' into maint
* legoscia/fix-ssl-example/PR-976/OTP-13363:
ssl: Modernize utility function
Fix ssl example
Diffstat (limited to 'lib/ssl/src/ssl.erl')
-rw-r--r-- | lib/ssl/src/ssl.erl | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl index 3afc3a5e87..780bef5877 100644 --- a/lib/ssl/src/ssl.erl +++ b/lib/ssl/src/ssl.erl @@ -60,22 +60,19 @@ -spec start() -> ok | {error, reason()}. -spec start(permanent | transient | temporary) -> ok | {error, reason()}. %% -%% Description: Utility function that starts the ssl, -%% crypto and public_key applications. Default type -%% is temporary. see application(3) +%% Description: Utility function that starts the ssl and applications +%% that it depends on. +%% see application(3) %%-------------------------------------------------------------------- start() -> - application:start(crypto), - application:start(asn1), - application:start(public_key), - application:start(ssl). - + start(temporary). start(Type) -> - application:start(crypto, Type), - application:start(asn1), - application:start(public_key, Type), - application:start(ssl, Type). - + case application:ensure_all_started(ssl, Type) of + {ok, _} -> + ok; + Other -> + Other + end. %%-------------------------------------------------------------------- -spec stop() -> ok. %% |