aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/dtls_connection.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2018-12-03 13:17:34 +0100
committerIngela Anderton Andin <[email protected]>2018-12-03 19:42:07 +0100
commit6558b668f630cda7bd3f4d81418b17843b5bbbf3 (patch)
tree09219f37d54428321c86dbe8ecab86286f0d7b43 /lib/ssl/src/dtls_connection.erl
parent15aa90e8d852e27a6dc28c713aee66f57574705e (diff)
downloadotp-6558b668f630cda7bd3f4d81418b17843b5bbbf3.tar.gz
otp-6558b668f630cda7bd3f4d81418b17843b5bbbf3.tar.bz2
otp-6558b668f630cda7bd3f4d81418b17843b5bbbf3.zip
ssl: Fix error handling in function passive_receive
Also avoid code duplication Conflicts: lib/ssl/src/dtls_connection.erl lib/ssl/src/tls_connection.erl
Diffstat (limited to 'lib/ssl/src/dtls_connection.erl')
-rw-r--r--lib/ssl/src/dtls_connection.erl11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/ssl/src/dtls_connection.erl b/lib/ssl/src/dtls_connection.erl
index fa96c585a0..37719ad439 100644
--- a/lib/ssl/src/dtls_connection.erl
+++ b/lib/ssl/src/dtls_connection.erl
@@ -50,7 +50,7 @@
-export([encode_alert/3, send_alert/2, send_alert_in_connection/2, close/5, protocol_name/0]).
%% Data handling
--export([encode_data/3, passive_receive/2,
+-export([encode_data/3, next_record/1,
send/3, socket/5, setopts/3, getopts/3]).
%% gen_statem state functions
@@ -381,15 +381,6 @@ protocol_name() ->
encode_data(Data, Version, ConnectionStates0)->
dtls_record:encode_data(Data, Version, ConnectionStates0).
-passive_receive(State0 = #state{user_data_buffer = Buffer}, StateName) ->
- case Buffer of
- <<>> ->
- next_event(StateName, no_record, State0);
- _ ->
- {Record, State} = ssl_connection:read_application_data(<<>>, State0),
- next_event(StateName, Record, State)
- end.
-
send(Transport, {_, {{_,_}, _} = Socket}, Data) ->
send(Transport, Socket, Data);
send(Transport, Socket, Data) ->