aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test/diameter_traffic_SUITE.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2017-07-08 00:48:07 +0200
committerAnders Svensson <[email protected]>2017-08-03 17:14:28 +0200
commit55e65b262cdf0b794ab443928676720a323cf6b0 (patch)
treefe4214afece02c79c2f48b2a10e11bdf20c364f4 /lib/diameter/test/diameter_traffic_SUITE.erl
parentdf12f634bec4b784f4c8d16846f2c24297b0e1ac (diff)
downloadotp-55e65b262cdf0b794ab443928676720a323cf6b0.tar.gz
otp-55e65b262cdf0b794ab443928676720a323cf6b0.tar.bz2
otp-55e65b262cdf0b794ab443928676720a323cf6b0.zip
Rename record_decode -> decode_format
{record_decode, map} is a bit too quirky.
Diffstat (limited to 'lib/diameter/test/diameter_traffic_SUITE.erl')
-rw-r--r--lib/diameter/test/diameter_traffic_SUITE.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl
index adf8bf4d66..aa0098ccd6 100644
--- a/lib/diameter/test/diameter_traffic_SUITE.erl
+++ b/lib/diameter/test/diameter_traffic_SUITE.erl
@@ -142,8 +142,8 @@
%% How to construct outgoing messages.
-define(ENCODINGS, [list, record, map]).
-%% How to set record_decode.
--define(DECODINGS, [true, false, map, list]).
+%% How to decode incoming messages.
+-define(DECODINGS, [record, false, map, list]).
%% How to send answers, in a diameter_packet or not.
-define(CONTAINERS, [pkt, msg]).
@@ -462,7 +462,7 @@ start_services(Config) ->
server_service = SN,
server_decoding = SD}
= group(Config),
- ok = diameter:start_service(SN, [{record_decode, SD}
+ ok = diameter:start_service(SN, [{decode_format, SD}
| ?SERVICE(SN, S)]),
ok = diameter:start_service(CN, [{sequence, ?CLIENT_MASK}
| ?SERVICE(CN, S)]).
@@ -1065,11 +1065,11 @@ origin(N) ->
%% Map atoms. The atoms are part of (constructed) group names, so it's
%% good that they're readable.
-decode(true) -> 0; %% record
+decode(record) -> 0;
decode(list) -> 1;
decode(map) -> 2;
decode(false) -> 3;
-decode(0) -> true;
+decode(0) -> record;
decode(1) -> list;
decode(2) -> map;
decode(3) -> false.
@@ -1113,14 +1113,14 @@ to_map(map, #diameter_packet{msg = Msg})
to_map(list, #diameter_packet{msg = [MsgName | Avps]}) ->
maps:put(':name', MsgName, maps:from_list(Avps));
-to_map(true, #diameter_packet{header = H, msg = Rec}) ->
+to_map(record, #diameter_packet{header = H, msg = Rec}) ->
rec_to_map(Rec, dict(H));
%% No record decode: do it ourselves.
to_map(false, #diameter_packet{header = H,
msg = false,
bin = Bin}) ->
- Opts = #{record_decode => map,
+ Opts = #{decode_format => map,
string_decode => false,
strict_mbit => true,
rfc => 6733},