From 0c2807d5f4ed72051c633c3ae9d3e88d8839a672 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Sat, 16 May 2015 17:39:28 +0200 Subject: 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. --- lib/diameter/src/base/diameter_traffic.erl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/diameter/src') 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; -- cgit v1.2.3