aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_traffic.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2014-08-20 22:44:28 +0200
committerAnders Svensson <[email protected]>2014-09-08 14:26:02 +0200
commit0f9cdbaf4d7fde93d319be7789dd4119092d91c6 (patch)
tree80a32548715f91ba7325fba457aa3cf8e740465c /lib/diameter/src/base/diameter_traffic.erl
parentdeb951bf382edaf7e8fcec7f57a94d798d2a460f (diff)
downloadotp-0f9cdbaf4d7fde93d319be7789dd4119092d91c6.tar.gz
otp-0f9cdbaf4d7fde93d319be7789dd4119092d91c6.tar.bz2
otp-0f9cdbaf4d7fde93d319be7789dd4119092d91c6.zip
Fix best effort decode of Failed-AVP
Commit c2c00fdd didn't get it quite right: it only decoded failed AVPs in the common dictionary since it's this dictionary an answer-message is decoded in. An extra dictionary isn't something that's easily passed through the decode without rewriting dictionary compilation however, and that's no small job, so continue with the use/abuse of the process dictionary by storing the dictionary module for the decode to retrieve. This is one step worse than previous uses since the dictionary is put in one module (diameter_codec) and got in another (the dictionary module), but it's the lesser of two evils.
Diffstat (limited to 'lib/diameter/src/base/diameter_traffic.erl')
-rw-r--r--lib/diameter/src/base/diameter_traffic.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/diameter/src/base/diameter_traffic.erl b/lib/diameter/src/base/diameter_traffic.erl
index c4875c5975..280d09d7e8 100644
--- a/lib/diameter/src/base/diameter_traffic.erl
+++ b/lib/diameter/src/base/diameter_traffic.erl
@@ -476,7 +476,7 @@ send_A({Caps, Pkt}, TPid, Dict0, _RecvData) -> %% unsupported application
#diameter_packet{errors = [RC|_]} = Pkt,
send_A(answer_message(RC, Caps, Dict0, Pkt),
TPid,
- Dict0,
+ {Dict0, Dict0},
Pkt,
[],
[]);
@@ -1457,7 +1457,7 @@ handle_answer(SvcName,
= App,
{answer, Req, Dict0, Pkt}) ->
Dict = dict(AppDict, Dict0, Pkt),
- handle_A(errors(Id, diameter_codec:decode(Dict, Pkt)),
+ handle_A(errors(Id, diameter_codec:decode({Dict, AppDict}, Pkt)),
SvcName,
Dict,
Dict0,