diff options
author | Anders Svensson <[email protected]> | 2019-02-08 09:34:20 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2019-02-08 14:35:37 +0100 |
commit | 6217e81657d98323f2be5f1bcb9cd76fcee13069 (patch) | |
tree | 1835234b480891107404f197642b82384303c492 | |
parent | a113f6117fd696ea6f84ed754055b4ec97a7ccb2 (diff) | |
download | otp-6217e81657d98323f2be5f1bcb9cd76fcee13069.tar.gz otp-6217e81657d98323f2be5f1bcb9cd76fcee13069.tar.bz2 otp-6217e81657d98323f2be5f1bcb9cd76fcee13069.zip |
Fix nocatch on incoming answer with faulty Experimental-Result-Code
Failure to decode the Grouped AVP results in a throw from module
diameter_gen, which is caught in the normal message decode, but wasn't
when only the AVP is decoded from diameter_traffic (for error checking
and counter increment). The result was no handle_answer/error
callback, and an error return from diameter:call/4 when the detach
option was not specified.
-rw-r--r-- | lib/diameter/src/base/diameter_gen.erl | 2 | ||||
-rw-r--r-- | lib/diameter/src/base/diameter_traffic.erl | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/diameter/src/base/diameter_gen.erl b/lib/diameter/src/base/diameter_gen.erl index 93ebe57685..d30c3d0441 100644 --- a/lib/diameter/src/base/diameter_gen.erl +++ b/lib/diameter/src/base/diameter_gen.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2017. All Rights Reserved. +%% Copyright Ericsson AB 2010-2019. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/diameter/src/base/diameter_traffic.erl b/lib/diameter/src/base/diameter_traffic.erl index d2856ae530..2d3e4a2ac9 100644 --- a/lib/diameter/src/base/diameter_traffic.erl +++ b/lib/diameter/src/base/diameter_traffic.erl @@ -1925,6 +1925,8 @@ get_avp(Dict, Name, [#diameter_header{} | Avps]) -> A = find_avp(Code, Vid, Avps), avp_decode(Dict, Name, ungroup(A)) catch + {diameter_gen, _} -> %% faulty Grouped AVP + undefined; error: _ -> undefined end; |