From 0f9cdbaf4d7fde93d319be7789dd4119092d91c6 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Wed, 20 Aug 2014 22:44:28 +0200 Subject: 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. --- lib/diameter/src/base/diameter_traffic.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/diameter/src/base/diameter_traffic.erl') 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, -- cgit v1.2.3