diff options
author | Anders Svensson <[email protected]> | 2017-09-05 15:00:58 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2017-09-05 15:00:58 +0200 |
commit | 31c4defc94c44f8cdb2bd54b0a4f829f47e4ac69 (patch) | |
tree | af3f1c1c58a0906ac5c9b074996a7e9d75f4ffcd /lib/diameter/src/base/diameter_codec.erl | |
parent | 67f6114d3701dd38614acf520f13c07174a99d11 (diff) | |
parent | eb54c14b3c0ad26c365e6be70256f16fc8e72d70 (diff) | |
download | otp-31c4defc94c44f8cdb2bd54b0a4f829f47e4ac69.tar.gz otp-31c4defc94c44f8cdb2bd54b0a4f829f47e4ac69.tar.bz2 otp-31c4defc94c44f8cdb2bd54b0a4f829f47e4ac69.zip |
Merge branch 'anders/diameter/DOIC/OTP-14588' into maint
* anders/diameter/DOIC/OTP-14588:
Exercise avp_dictionaries in traffic suite
Let generic AVPs be encoded/decoded in alternate dictionaries
Rename field in codec map: dictionary -> app_dictionary
Add RFC 7683 Diameter Overload Indicator Conveyance text and dictionary
Fix decode undef
Fix dictionary compilation error message
Diffstat (limited to 'lib/diameter/src/base/diameter_codec.erl')
-rw-r--r-- | lib/diameter/src/base/diameter_codec.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/diameter/src/base/diameter_codec.erl b/lib/diameter/src/base/diameter_codec.erl index 63e39b12d1..2dd2c906a2 100644 --- a/lib/diameter/src/base/diameter_codec.erl +++ b/lib/diameter/src/base/diameter_codec.erl @@ -324,7 +324,7 @@ decode_avps(MsgName, Mod, AppMod, Opts, #diameter_packet{bin = Bin} = Pkt) -> {_, Avps} = split_binary(Bin, 20), {Rec, As, Errors} = Mod:decode_avps(MsgName, Avps, - Opts#{dictionary => AppMod, + Opts#{app_dictionary => AppMod, failed_avp => false}), ?LOGC([] /= Errors, decode_errors, Pkt#diameter_packet.header), Pkt#diameter_packet{msg = reformat(MsgName, Rec, Opts), @@ -614,8 +614,8 @@ pack_avp(#diameter_avp{data = {T, {Type, Value}}}, Opts) -> pack_avp(#diameter_avp{data = {T, Data}}, _) -> pack_data(T, Data); -pack_avp(#diameter_avp{data = {Dict, Name, Data}}, Opts) -> - pack_data(Dict:avp_header(Name), Dict:avp(encode, Data, Name, Opts)); +pack_avp(#diameter_avp{data = {Dict, Name, Value}}, Opts) -> + pack_data(Dict:avp_header(Name), Dict:avp(encode, Value, Name, Opts)); %% ... with a truncated header ... pack_avp(#diameter_avp{code = undefined, data = B}, _) |