diff options
author | Ingela Anderton Andin <[email protected]> | 2017-03-08 10:42:24 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2017-03-08 10:42:24 +0100 |
commit | b1b8a8d5f60de105371d17fefcb4812887250ff9 (patch) | |
tree | 47888be06e5eb3c5ebe70bf2dc9b394c337bcfc5 /lib/ssl/src/dtls_handshake.erl | |
parent | d2e05787454aebc8406a2f781b2648c552019763 (diff) | |
parent | 98ecac283f87e02e7916a402043a3bd518fc25be (diff) | |
download | otp-b1b8a8d5f60de105371d17fefcb4812887250ff9.tar.gz otp-b1b8a8d5f60de105371d17fefcb4812887250ff9.tar.bz2 otp-b1b8a8d5f60de105371d17fefcb4812887250ff9.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/ssl/src/dtls_handshake.erl')
-rw-r--r-- | lib/ssl/src/dtls_handshake.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ssl/src/dtls_handshake.erl b/lib/ssl/src/dtls_handshake.erl index af3708ddb7..fd1f9698fe 100644 --- a/lib/ssl/src/dtls_handshake.erl +++ b/lib/ssl/src/dtls_handshake.erl @@ -136,9 +136,11 @@ handshake_bin([Type, Length, Data], Seq) -> %%-------------------------------------------------------------------- -spec get_dtls_handshake(dtls_record:dtls_version(), binary(), #protocol_buffers{}) -> - {[{dtls_handshake(), binary()}], #protocol_buffers{}} | {more_data, #protocol_buffers{}}. + {[dtls_handshake()], #protocol_buffers{}}. %% -%% Description: ... +%% Description: Given buffered and new data from dtls_record, collects +%% and returns it as a list of handshake messages, also returns +%% possible leftover data in the new "protocol_buffers". %%-------------------------------------------------------------------- get_dtls_handshake(Version, Fragment, ProtocolBuffers) -> handle_fragments(Version, Fragment, ProtocolBuffers, []). @@ -288,8 +290,6 @@ do_handle_fragments(_, [], Buffers, Acc) -> {lists:reverse(Acc), Buffers}; do_handle_fragments(Version, [Fragment | Fragments], Buffers0, Acc) -> case reassemble(Version, Fragment, Buffers0) of - {more_data, _} = More when Acc == []-> - More; {more_data, Buffers} when Fragments == [] -> {lists:reverse(Acc), Buffers}; {more_data, Buffers} -> |