diff options
author | Ingela Anderton Andin <[email protected]> | 2017-11-29 10:23:05 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2017-11-29 10:23:05 +0100 |
commit | a8d9ed7566d571dc234891517ab95818a3d1b516 (patch) | |
tree | 1220aee08ac75942e303d27a0369e313a32d17a0 /lib/ssl/src/ssl_connection.erl | |
parent | 59ca0ddeb08d6ec433fa50eaa0a7175a09766b83 (diff) | |
parent | 186458d0e2cc2fbcbce9fd82d0aea11cbed61967 (diff) | |
download | otp-a8d9ed7566d571dc234891517ab95818a3d1b516.tar.gz otp-a8d9ed7566d571dc234891517ab95818a3d1b516.tar.bz2 otp-a8d9ed7566d571dc234891517ab95818a3d1b516.zip |
Merge branch 'ingela/ssl/cleaner-code' into maint
* ingela/ssl/cleaner-code:
ssl: Add gracefullness to dtls code
ssl: Remove old softupgrade code
ssl: Use genstamtem properly
Diffstat (limited to 'lib/ssl/src/ssl_connection.erl')
-rw-r--r-- | lib/ssl/src/ssl_connection.erl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl index 1f77b558ef..1d54a2793c 100644 --- a/lib/ssl/src/ssl_connection.erl +++ b/lib/ssl/src/ssl_connection.erl @@ -61,14 +61,11 @@ %% General gen_statem state functions with extra callback argument %% to determine if it is an SSL/TLS or DTLS gen_statem machine --export([init/4, hello/4, abbreviated/4, certify/4, cipher/4, connection/4, downgrade/4]). +-export([init/4, error/4, hello/4, abbreviated/4, certify/4, cipher/4, connection/4, downgrade/4]). %% gen_statem callbacks -export([terminate/3, format_status/2]). -%% TODO: do not export, call state function instead --export([handle_info/3, handle_call/5, handle_common_event/5]). - %%==================================================================== %% Setup %%==================================================================== @@ -539,6 +536,15 @@ init(_Type, _Event, _State, _Connection) -> {keep_state_and_data, [postpone]}. %%-------------------------------------------------------------------- +-spec error(gen_statem:event_type(), + {start, timeout()} | term(), #state{}, + tls_connection | dtls_connection) -> + gen_statem:state_function_result(). +%%-------------------------------------------------------------------- +error({call, From}, Msg, State, Connection) -> + handle_call(Msg, From, ?FUNCTION_NAME, State, Connection). + +%%-------------------------------------------------------------------- -spec hello(gen_statem:event_type(), #hello_request{} | #server_hello{} | term(), #state{}, tls_connection | dtls_connection) -> |