aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/ssl_packet_SUITE.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2018-12-14 09:48:38 +0100
committerIngela Anderton Andin <[email protected]>2018-12-14 09:48:38 +0100
commita2cdf319505b102c0b8bb192d36a08448d304559 (patch)
tree2a4da39871781bd69bce461141aacfa9b7d5ef8b /lib/ssl/test/ssl_packet_SUITE.erl
parentf191f67b98c3efeef08045b212472ed9af1f0d7b (diff)
parent28dcf6d400cea06e4bc8ca1d4224aae009ef232e (diff)
downloadotp-a2cdf319505b102c0b8bb192d36a08448d304559.tar.gz
otp-a2cdf319505b102c0b8bb192d36a08448d304559.tar.bz2
otp-a2cdf319505b102c0b8bb192d36a08448d304559.zip
Merge branch 'ingela/ssl/optimize/OTP-15445' into maint
* ingela/ssl/optimize/OTP-15445: ssl: Fix test case ssl: Remove no longer needed functions ssl: Fix downgrade ssl: Remove checks and conversions not needed ssl: Use binary:copy/2 to avoid list overhead ssl: Remove unnecessary internal event ssl: Clean code ssl: Add static_env record
Diffstat (limited to 'lib/ssl/test/ssl_packet_SUITE.erl')
-rw-r--r--lib/ssl/test/ssl_packet_SUITE.erl23
1 files changed, 5 insertions, 18 deletions
diff --git a/lib/ssl/test/ssl_packet_SUITE.erl b/lib/ssl/test/ssl_packet_SUITE.erl
index 9af1ae0e3f..6d26b2df33 100644
--- a/lib/ssl/test/ssl_packet_SUITE.erl
+++ b/lib/ssl/test/ssl_packet_SUITE.erl
@@ -2122,26 +2122,13 @@ active_once_packet(Socket, Data, N) ->
active_once_packet(Socket, Data, N-1).
active_raw(Socket, Data, N) ->
- active_raw(Socket, Data, N, []).
-
-active_raw(_Socket, _, 0, _) ->
+ active_raw(Socket, (length(Data) * N)).
+active_raw(_Socket, 0) ->
ok;
-active_raw(Socket, Data, N, Acc) ->
+active_raw(Socket, N) ->
receive
- {ssl, Socket, Byte} when length(Byte) == 1 ->
- receive
- {ssl, Socket, _} ->
- active_raw(Socket, Data, N -1)
- end;
- {ssl, Socket, Data} ->
- active_raw(Socket, Data, N-1, []);
- {ssl, Socket, Other} ->
- case Acc ++ Other of
- Data ->
- active_raw(Socket, Data, N-1, []);
- NewAcc ->
- active_raw(Socket, Data, NewAcc)
- end
+ {ssl, Socket, Bytes} ->
+ active_raw(Socket, N-length(Bytes))
end.
active_packet(Socket, _, 0) ->