aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2015-05-16 17:39:28 +0200
committerAnders Svensson <[email protected]>2015-05-18 14:10:43 +0200
commit0c2807d5f4ed72051c633c3ae9d3e88d8839a672 (patch)
treebf1d95c0626e8b2eb88ce231915c570b03c8184f /lib/diameter/src
parent3e7ec99afb2469cff4e776de5b6d16909315ff88 (diff)
downloadotp-0c2807d5f4ed72051c633c3ae9d3e88d8839a672.tar.gz
otp-0c2807d5f4ed72051c633c3ae9d3e88d8839a672.tar.bz2
otp-0c2807d5f4ed72051c633c3ae9d3e88d8839a672.zip
Include R-bit in unknown message counter keys
To differentiate between requests and answers, in analogy with relay counters. This isn't backwards compatible, but these counters aren't yet documented.
Diffstat (limited to 'lib/diameter/src')
-rw-r--r--lib/diameter/src/base/diameter_traffic.erl9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/diameter/src/base/diameter_traffic.erl b/lib/diameter/src/base/diameter_traffic.erl
index e8afa089ef..517daf6678 100644
--- a/lib/diameter/src/base/diameter_traffic.erl
+++ b/lib/diameter/src/base/diameter_traffic.erl
@@ -1114,11 +1114,14 @@ msg_id(Hdr, Dict) ->
?APP_ID_RELAY ->
{relay, R};
A ->
- choose(A /= Aid orelse '' == Dict:msg_name(Code, 0 == R),
- unknown,
- Id)
+ unknown(A /= Aid orelse '' == Dict:msg_name(Code, 0 == R), Id)
end.
+unknown(true, {_, _, R}) ->
+ {unknown, R};
+unknown(false, Id) ->
+ Id.
+
%% No E-bit: can't be 3xxx.
is_result(RC, false, _Dict0) ->
RC < 3000 orelse 4000 =< RC;