aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_watchdog.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2014-05-25 09:30:59 +0200
committerAnders Svensson <[email protected]>2014-05-25 09:30:59 +0200
commit6202139d7680be7df2fc5a6d6138409c1ae780d6 (patch)
treed4720faae1220868e6211290ec8061fbbeb63778 /lib/diameter/src/base/diameter_watchdog.erl
parent5782c3aad85c5c1e644d160504d9c8d27ffdc2f1 (diff)
parent58a070c491e7f2f87a3c6bb09a5c05208a9aa333 (diff)
downloadotp-6202139d7680be7df2fc5a6d6138409c1ae780d6.tar.gz
otp-6202139d7680be7df2fc5a6d6138409c1ae780d6.tar.bz2
otp-6202139d7680be7df2fc5a6d6138409c1ae780d6.zip
Merge branch 'anders/diameter/rc_counters/OTP-11937' into maint
* anders/diameter/rc_counters/OTP-11937: Count encode errors in outgoing messages Count decode errors in incoming requests Count decode errors independently of result codes
Diffstat (limited to 'lib/diameter/src/base/diameter_watchdog.erl')
-rw-r--r--lib/diameter/src/base/diameter_watchdog.erl13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/diameter/src/base/diameter_watchdog.erl b/lib/diameter/src/base/diameter_watchdog.erl
index 079e1c0bc2..dbfe087659 100644
--- a/lib/diameter/src/base/diameter_watchdog.erl
+++ b/lib/diameter/src/base/diameter_watchdog.erl
@@ -562,17 +562,20 @@ recv(Name, Pkt, S) ->
rcv('DWR', Pkt, #watchdog{transport = TPid,
dictionary = Dict0}) ->
+ DPkt = diameter_codec:decode(Dict0, Pkt),
+ diameter_traffic:incr_error(recv, DPkt, TPid),
EPkt = encode(dwa, Dict0, Pkt),
- diameter_traffic:incr_A(send, EPkt, TPid, Dict0),
+ diameter_traffic:incr_rc(send, EPkt, TPid, Dict0),
+
send(TPid, {send, EPkt}),
?LOG(send, 'DWA');
rcv('DWA', Pkt, #watchdog{transport = TPid,
dictionary = Dict0}) ->
- diameter_traffic:incr_A(recv,
- diameter_codec:decode(Dict0, Pkt),
- TPid,
- Dict0);
+ diameter_traffic:incr_rc(recv,
+ diameter_codec:decode(Dict0, Pkt),
+ TPid,
+ Dict0);
rcv(N, _, _)
when N == 'CER';