diff options
author | Anders Svensson <[email protected]> | 2017-07-06 09:58:07 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2017-08-03 17:14:27 +0200 |
commit | 722fa41564381dff0b7aa2b465193db30bb2f02f (patch) | |
tree | 67afd73ba56f5a55b4b804c0f99d6202d58ab65c /lib/diameter/src/base/diameter_traffic.erl | |
parent | e30c38a44bbe2872e5b9b0ad46774c19b6af5292 (diff) | |
download | otp-722fa41564381dff0b7aa2b465193db30bb2f02f.tar.gz otp-722fa41564381dff0b7aa2b465193db30bb2f02f.tar.bz2 otp-722fa41564381dff0b7aa2b465193db30bb2f02f.zip |
Add service_opt() record_decode
To control whether or not messages and grouped AVPs are decoded to
records, in #diameter_packet.msg and #diameter_avp.value respectively.
The decode became unnecessary for diameter's needs in parent commit,
which decoupled it from the checking of AVP arities.
Diffstat (limited to 'lib/diameter/src/base/diameter_traffic.erl')
-rw-r--r-- | lib/diameter/src/base/diameter_traffic.erl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/diameter/src/base/diameter_traffic.erl b/lib/diameter/src/base/diameter_traffic.erl index 85378babea..228d9802ad 100644 --- a/lib/diameter/src/base/diameter_traffic.erl +++ b/lib/diameter/src/base/diameter_traffic.erl @@ -76,7 +76,8 @@ service_name :: diameter:service_name(), apps :: [#diameter_app{}], sequence :: diameter:sequence(), - codec :: #{string_decode := boolean(), + codec :: #{record_decode := boolean(), + string_decode := boolean(), strict_mbit := boolean(), incoming_maxlen := diameter:message_length()}}). %% Note that incoming_maxlen is currently handled in diameter_peer_fsm, @@ -102,7 +103,8 @@ make_recvdata([SvcName, PeerT, Apps, SvcOpts | _]) -> peerT = PeerT, apps = Apps, sequence = Mask, - codec = maps:with([string_decode, + codec = maps:with([record_decode, + string_decode, strict_mbit, ordered_encode, incoming_maxlen], @@ -1933,7 +1935,8 @@ choose(false, _, X) -> X. %% Decode options sufficient for AVP extraction. decode_opts(Dict) -> - #{string_decode => false, + #{record_decode => true, + string_decode => false, strict_mbit => false, failed_avp => false, dictionary => Dict}. |