diff options
author | Anders Svensson <[email protected]> | 2017-06-11 01:13:36 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2017-06-12 16:13:03 +0200 |
commit | 373cd07c28bbe3e299eaca1c96b1441623ad4979 (patch) | |
tree | 726877cfda5687f446d66e62816d0a4180753e02 /lib/diameter/test | |
parent | 84bfb4980a5d6dd806cff07c8dc1c9f2ef85fc20 (diff) | |
download | otp-373cd07c28bbe3e299eaca1c96b1441623ad4979.tar.gz otp-373cd07c28bbe3e299eaca1c96b1441623ad4979.tar.bz2 otp-373cd07c28bbe3e299eaca1c96b1441623ad4979.zip |
Add diameter_sctp send/recv callbacks
Corresponding to diameter_tcp callbacks a few commits back. Exercise the
callbacks in the traffic suite.
Diffstat (limited to 'lib/diameter/test')
-rw-r--r-- | lib/diameter/test/diameter_traffic_SUITE.erl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl index bb10638cd2..95339127d4 100644 --- a/lib/diameter/test/diameter_traffic_SUITE.erl +++ b/lib/diameter/test/diameter_traffic_SUITE.erl @@ -108,7 +108,7 @@ handle_error/6, handle_request/3]). -%% diameter_tcp callbacks +%% diameter_{tcp,sctp} callbacks -export([message/3]). -include("diameter.hrl"). @@ -158,7 +158,7 @@ %% Send from a dedicated process? -define(SENDERS, [true, false]). -%% Message callbacks from diameter_tcp? +%% Message callbacks from diameter_{tcp,sctp}? -define(CALLBACKS, [true, false]). -record(group, @@ -465,9 +465,8 @@ add_transports(Config) -> = group(Config), LRef = ?util:listen(SN, [T, - {sender, SS} - | [{message_cb, {?MODULE, message, [4]}} - || ST andalso T == tcp]], + {sender, SS}, + {message_cb, ST andalso {?MODULE, message, [4]}}], [{capabilities_cb, fun capx/2}, {pool_size, 8}, {spawn_opt, [{min_heap_size, 8096}]}, @@ -1510,6 +1509,9 @@ request(#diameter_base_RAR{}, _Caps) -> %% Limit the number of messages received. More can be received if read %% in the same packet. +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]; |