diff options
author | Ingela Anderton Andin <[email protected]> | 2011-02-11 12:12:44 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2011-02-11 12:12:44 +0100 |
commit | 6e396e67664be90a13c3119a0c766019dd889845 (patch) | |
tree | d69f4575cc4fb34efcc13e50e55a7b0409a4bcee /lib | |
parent | c694c0be5656bda37fafdef858a82c76bdcf8f14 (diff) | |
parent | 55203980361ea0e39ac40569583c598c147ad9b2 (diff) | |
download | otp-6e396e67664be90a13c3119a0c766019dd889845.tar.gz otp-6e396e67664be90a13c3119a0c766019dd889845.tar.bz2 otp-6e396e67664be90a13c3119a0c766019dd889845.zip |
Merge branch 'ia/ssl/dialyzer-spec-fixes' into dev
* ia/ssl/dialyzer-spec-fixes:
Added missing return value in dialyzer specs (ssl.erl)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ssl/src/inet_ssl_dist.erl | 6 | ||||
-rw-r--r-- | lib/ssl/src/ssl.erl | 15 |
2 files changed, 16 insertions, 5 deletions
diff --git a/lib/ssl/src/inet_ssl_dist.erl b/lib/ssl/src/inet_ssl_dist.erl index f62aefd35a..b10aa76246 100644 --- a/lib/ssl/src/inet_ssl_dist.erl +++ b/lib/ssl/src/inet_ssl_dist.erl @@ -135,6 +135,9 @@ accept_connection(AcceptPid, Socket, MyNode, Allowed, SetupTime) -> [self(), AcceptPid, Socket, MyNode, Allowed, SetupTime]). +%% Suppress dialyzer warning, we do not really care about old ssl code +%% as we intend to remove it. +-spec(do_accept/6 :: (_,_,_,_,_,_) -> no_return()). do_accept(Kernel, AcceptPid, Socket, MyNode, Allowed, SetupTime) -> process_flag(priority, max), receive @@ -204,6 +207,9 @@ setup(Node, Type, MyNode, LongOrShortNames,SetupTime) -> LongOrShortNames, SetupTime]). +%% Suppress dialyzer warning, we do not really care about old ssl code +%% as we intend to remove it. +-spec(do_setup/6 :: (_,_,_,_,_,_) -> no_return()). do_setup(Kernel, Node, Type, MyNode, LongOrShortNames,SetupTime) -> process_flag(priority, max), ?trace("~p~n",[{inet_ssl_dist,self(),setup,Node}]), diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl index 0e108c430f..65b081937f 100644 --- a/lib/ssl/src/ssl.erl +++ b/lib/ssl/src/ssl.erl @@ -98,9 +98,12 @@ stop() -> application:stop(ssl). %%-------------------------------------------------------------------- --spec connect(host() | port(), [option()]) -> {ok, #sslsocket{}}. --spec connect(host() | port(), [option()] | port_num(), timeout() | list()) -> {ok, #sslsocket{}}. --spec connect(host() | port(), port_num(), list(), timeout()) -> {ok, #sslsocket{}}. +-spec connect(host() | port(), [option()]) -> {ok, #sslsocket{}} | + {error, reason()}. +-spec connect(host() | port(), [option()] | port_num(), timeout() | list()) -> + {ok, #sslsocket{}} | {error, reason()}. +-spec connect(host() | port(), port_num(), list(), timeout()) -> + {ok, #sslsocket{}} | {error, reason()}. %% %% Description: Connect to a ssl server. @@ -171,8 +174,10 @@ listen(Port, Options0) -> end. %%-------------------------------------------------------------------- --spec transport_accept(#sslsocket{}) -> {ok, #sslsocket{}}. --spec transport_accept(#sslsocket{}, timeout()) -> {ok, #sslsocket{}}. +-spec transport_accept(#sslsocket{}) -> {ok, #sslsocket{}} | + {error, reason()}. +-spec transport_accept(#sslsocket{}, timeout()) -> {ok, #sslsocket{}} | + {error, reason()}. %% %% Description: Performs transport accept on a ssl listen socket %%-------------------------------------------------------------------- |