diff options
author | Anders Svensson <[email protected]> | 2014-05-22 02:09:23 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2014-05-23 12:04:05 +0200 |
commit | 58a070c491e7f2f87a3c6bb09a5c05208a9aa333 (patch) | |
tree | 5950784baf1724298ff3a6eb0cdcbc33f00af5b7 /lib/diameter/src/base/diameter_watchdog.erl | |
parent | 6642bfc89b9a9863ea1f4864d28b96b075beedd8 (diff) | |
download | otp-58a070c491e7f2f87a3c6bb09a5c05208a9aa333.tar.gz otp-58a070c491e7f2f87a3c6bb09a5c05208a9aa333.tar.bz2 otp-58a070c491e7f2f87a3c6bb09a5c05208a9aa333.zip |
Count encode errors in outgoing messages
Only decode errors were counted previously. Keys are of the form
{Id, send, error}, where Id is:
{ApplicationId, CommandCode, Rbit} | unknown
The latter will be the case if not even a #diameter_header{} can be
constructed.
Diffstat (limited to 'lib/diameter/src/base/diameter_watchdog.erl')
-rw-r--r-- | lib/diameter/src/base/diameter_watchdog.erl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/diameter/src/base/diameter_watchdog.erl b/lib/diameter/src/base/diameter_watchdog.erl index 710017e62f..87b69cc60d 100644 --- a/lib/diameter/src/base/diameter_watchdog.erl +++ b/lib/diameter/src/base/diameter_watchdog.erl @@ -559,18 +559,20 @@ recv(Name, Pkt, S) -> rcv('DWR', Pkt, #watchdog{transport = TPid, dictionary = Dict0}) -> - diameter_traffic:incr_R(recv, diameter_codec:decode(Pkt), TPid), + 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'; |