diff options
author | Anders Svensson <[email protected]> | 2017-07-26 14:17:37 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2017-08-03 17:14:27 +0200 |
commit | c63f31deeff7eea054ff3b84b73c1b5b03d5aec6 (patch) | |
tree | 76e1b1cbbeeec4efd6ff6951c46d87715ce93018 | |
parent | 483aceacd063d0a9b787bf468e795617d52e0507 (diff) | |
download | otp-c63f31deeff7eea054ff3b84b73c1b5b03d5aec6.tar.gz otp-c63f31deeff7eea054ff3b84b73c1b5b03d5aec6.tar.bz2 otp-c63f31deeff7eea054ff3b84b73c1b5b03d5aec6.zip |
Fix message_cb in traffic suite
Matched a byte instead of a bit, and increment/decrement wasn't
symmetric. Allow more requests since some requests timeout.
Bungled in commit 09089872.
-rw-r--r-- | lib/diameter/test/diameter_traffic_SUITE.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl index 0a93033d83..dd0dfc776d 100644 --- a/lib/diameter/test/diameter_traffic_SUITE.erl +++ b/lib/diameter/test/diameter_traffic_SUITE.erl @@ -467,7 +467,7 @@ add_transports(Config) -> LRef = ?util:listen(SN, [T, {sender, SS}, - {message_cb, ST andalso {?MODULE, message, [4]}} + {message_cb, ST andalso {?MODULE, message, [0]}} | [{packet, hd(?util:scramble([false, raw]))} || T == sctp andalso CS]], [{capabilities_cb, fun capx/2}, @@ -1614,8 +1614,8 @@ message(Dir, #diameter_packet{bin = Bin}, N) -> message(Dir, Bin, N); %% incoming request -message(recv, <<_:32, 1, _/bits>> = Bin, N) -> - [Bin, 1 < N, fun ?MODULE:message/3, N-1]; +message(recv, <<_:32, 1:1, _/bits>> = Bin, N) -> + [Bin, N < 16, fun ?MODULE:message/3, N+1]; %% incoming answer message(recv, Bin, _) -> @@ -1626,12 +1626,12 @@ message(send, Bin, _) -> [Bin]; %% sent request -message(ack, <<_:32, 1, _/bits>>, _) -> +message(ack, <<_:32, 1:1, _/bits>>, _) -> []; %% sent answer or discarded request message(ack, _, N) -> - [0 =< N, fun ?MODULE:message/3, N+1]. + [N =< 16, fun ?MODULE:message/3, N-1]. %% ------------------------------------------------------------------------ |