aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/tls_connection.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2018-12-13 08:29:28 +0100
committerIngela Anderton Andin <[email protected]>2018-12-13 15:32:19 +0100
commitb60dbb1ce35144fda0dacd96e5271e3ed812be9b (patch)
tree288738ce55fcfc9d141ea64c8ca6c078c4e51b70 /lib/ssl/src/tls_connection.erl
parent0d6fb3f9c0740c74b0b9381d38f0360b9c81160d (diff)
downloadotp-b60dbb1ce35144fda0dacd96e5271e3ed812be9b.tar.gz
otp-b60dbb1ce35144fda0dacd96e5271e3ed812be9b.tar.bz2
otp-b60dbb1ce35144fda0dacd96e5271e3ed812be9b.zip
ssl: Remove no longer needed functions
As the stop wrapper functions are no longer needed after tls_sender that altered the behaviour of the TLS distribution code.
Diffstat (limited to 'lib/ssl/src/tls_connection.erl')
-rw-r--r--lib/ssl/src/tls_connection.erl13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl
index 9d0a9085e5..9aeca8c589 100644
--- a/lib/ssl/src/tls_connection.erl
+++ b/lib/ssl/src/tls_connection.erl
@@ -198,12 +198,12 @@ next_event(StateName, Record, State, Actions) ->
%%% TLS record protocol level application data messages
-handle_protocol_record(#ssl_tls{type = ?APPLICATION_DATA, fragment = Data}, StateName, State) ->
+handle_protocol_record(#ssl_tls{type = ?APPLICATION_DATA, fragment = Data}, StateName, State0) ->
case ssl_connection:read_application_data(Data, State0) of
{stop, _, _} = Stop->
Stop;
{Record, State1} ->
- {next_state, StateName, State, Actions} = next_event(StateName0, Record, State1),
+ {next_state, StateName, State, Actions} = next_event(StateName, Record, State1),
ssl_connection:hibernate_after(StateName, State, Actions)
end;
%%% TLS record protocol level handshake messages
@@ -473,8 +473,9 @@ init(Type, Event, State) ->
%%--------------------------------------------------------------------
error({call, From}, {start, _Timeout},
#state{protocol_specific = #{error := Error}} = State) ->
- ssl_connection:stop_and_reply(
- normal, {reply, From, {error, Error}}, State);
+ {stop_and_reply, {shutdown, normal},
+ [{reply, From, {error, Error}}], State};
+
error({call, _} = Call, Msg, State) ->
gen_handshake(?FUNCTION_NAME, Call, Msg, State);
error(_, _, _) ->
@@ -824,7 +825,7 @@ handle_info({Protocol, _, Data}, StateName,
next_event(StateName, Record, State);
#alert{} = Alert ->
ssl_connection:handle_normal_shutdown(Alert, StateName, State0),
- ssl_connection:stop({shutdown, own_alert}, State0)
+ {stop, {shutdown, own_alert}, State0}
end;
handle_info({tcp_passive, Socket}, StateName,
#state{static_env = #static_env{socket = Socket},
@@ -859,7 +860,7 @@ handle_info({CloseTag, Socket}, StateName,
end,
ssl_connection:handle_normal_shutdown(?ALERT_REC(?FATAL, ?CLOSE_NOTIFY), StateName, State),
- ssl_connection:stop({shutdown, transport_closed}, State);
+ {stop, {shutdown, transport_closed}, State};
true ->
%% Fixes non-delivery of final TLS record in {active, once}.
%% Basically allows the application the opportunity to set {active, once} again