diff options
author | Ingela Anderton Andin <[email protected]> | 2018-12-13 17:42:31 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2019-01-08 16:28:53 +0100 |
commit | 48c145e8f8e010f352971ae13b74e270a9ffd593 (patch) | |
tree | 5d43ee49d84401c255e44e3ccf9f96607c787d2a /lib | |
parent | 1dd3d4cbe22054e2bdccdfd442dcc6724ee51245 (diff) | |
download | otp-48c145e8f8e010f352971ae13b74e270a9ffd593.tar.gz otp-48c145e8f8e010f352971ae13b74e270a9ffd593.tar.bz2 otp-48c145e8f8e010f352971ae13b74e270a9ffd593.zip |
ssl: Fix test case
packet raw is a stream, test code manged it packet oriented in
the function active_raw.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ssl/test/ssl_packet_SUITE.erl | 23 |
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) -> |