diff options
author | Anders Svensson <[email protected]> | 2014-05-23 00:24:41 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2014-05-26 17:51:54 +0200 |
commit | c2c00fdd4de1b8883e47ec1b5b048659ef033302 (patch) | |
tree | 8db5258dc6e9d64b352c52c6760b26117a4af879 /lib/diameter/src | |
parent | 31a7c0b20dbcfdeee946064e610bd51b95be269c (diff) | |
download | otp-c2c00fdd4de1b8883e47ec1b5b048659ef033302.tar.gz otp-c2c00fdd4de1b8883e47ec1b5b048659ef033302.tar.bz2 otp-c2c00fdd4de1b8883e47ec1b5b048659ef033302.zip |
Do best-effort decode of Failed-AVP
Commit 4ce2d3a6 (diameter-1.4.2, OTP-11007) disabled the decode of
values in Failed-AVP components since any error caused the decode of
Failed-AVP itself to fail. This is less than useful since (1) we should
be able to decode it given that we've sent it (modulo mangling on the
way to the peer and back), and (2) it's not unheard of to examine
Failed-AVP to see what the peer objected to.
This commits adds a best-effort decode: decode if possible, otherwise
not, using the same abuse of the process dictionary as commit bbdb027c.
Diffstat (limited to 'lib/diameter/src')
-rw-r--r-- | lib/diameter/src/base/diameter_codec.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/diameter/src/base/diameter_codec.erl b/lib/diameter/src/base/diameter_codec.erl index 0ca4a84d21..06a4f5de64 100644 --- a/lib/diameter/src/base/diameter_codec.erl +++ b/lib/diameter/src/base/diameter_codec.erl @@ -593,7 +593,8 @@ pack_avp(#diameter_avp{code = undefined, data = B}) Len = size(<<H:5/binary, _:24, T/binary>> = <<B/binary, 0:Pad>>), <<H/binary, Len:24, T/binary>>; -%% ... from a dictionary compiled against old code (diameter_gen) ... +%% ... from a dictionary compiled against old code in diameter_gen ... +%% ... when ignoring errors in Failed-AVP ... pack_avp(#diameter_avp{data = <<0:1, B/binary>>} = A) -> pack_avp(A#diameter_avp{data = B}); |