aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2019-01-31 07:47:47 +0100
committerIngela Anderton Andin <[email protected]>2019-02-08 09:22:26 +0100
commitdf20de80e115caf9cb52d77bca6be5f53f7be115 (patch)
tree3a945c1752336809feab882c80634fc80f29a15e /lib/ssl/src
parentd689e8a2ea3557a6b7fed2f109a3a4554806a699 (diff)
downloadotp-df20de80e115caf9cb52d77bca6be5f53f7be115.tar.gz
otp-df20de80e115caf9cb52d77bca6be5f53f7be115.tar.bz2
otp-df20de80e115caf9cb52d77bca6be5f53f7be115.zip
ssl: Add erl_dist_handle to connection_env
Diffstat (limited to 'lib/ssl/src')
-rw-r--r--lib/ssl/src/ssl_connection.erl5
-rw-r--r--lib/ssl/src/ssl_connection.hrl4
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl
index 99d429511a..237cd03c0c 100644
--- a/lib/ssl/src/ssl_connection.erl
+++ b/lib/ssl/src/ssl_connection.erl
@@ -464,7 +464,7 @@ read_application_data(
Data,
#state{
user_data_buffer = Buffer0,
- erl_dist_handle = DHandle} = State) ->
+ connection_env = #connection_env{erl_dist_handle = DHandle}} = State) ->
%%
Buffer = bincat(Buffer0, Data),
case DHandle of
@@ -1110,12 +1110,13 @@ connection(cast, {internal_renegotiate, WriteState}, #state{static_env = #static
connection_states = ConnectionStates#{current_write => WriteState}}, []);
connection(cast, {dist_handshake_complete, DHandle},
#state{ssl_options = #ssl_options{erl_dist = true},
+ connection_env = CEnv,
socket_options = SockOpts} = State0, Connection) ->
process_flag(priority, normal),
State1 =
State0#state{
socket_options = SockOpts#socket_options{active = true},
- erl_dist_handle = DHandle,
+ connection_env = CEnv#connection_env{erl_dist_handle = DHandle},
bytes_to_read = undefined},
{Record, State} = read_application_data(<<>>, State1),
Connection:next_event(connection, Record, State);
diff --git a/lib/ssl/src/ssl_connection.hrl b/lib/ssl/src/ssl_connection.hrl
index f5fc8dde04..21c200271d 100644
--- a/lib/ssl/src/ssl_connection.hrl
+++ b/lib/ssl/src/ssl_connection.hrl
@@ -76,7 +76,8 @@
user_application :: {Monitor::reference(), User::pid()},
downgrade,
terminated = false ::boolean() | closed,
- negotiated_version :: ssl_record:ssl_version() | 'undefined'
+ negotiated_version :: ssl_record:ssl_version() | 'undefined',
+ erl_dist_handle = undefined :: erlang:dist_handle() | undefined
}).
-record(state, {
@@ -113,7 +114,6 @@
%% The mecahnism is also usefull in TLS although we do not
%% need to worry about packet loss in TLS. In DTLS we need to track DTLS handshake seqnr
flight_state = reliable, %% reliable | {retransmit, integer()}| {waiting, ref(), integer()} - last two is used in DTLS over udp.
- erl_dist_handle = undefined :: erlang:dist_handle() | undefined,
protocol_specific = #{} :: map()
}).