diff options
author | Anders Svensson <[email protected]> | 2014-05-25 09:29:30 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2014-05-25 09:29:30 +0200 |
commit | 5782c3aad85c5c1e644d160504d9c8d27ffdc2f1 (patch) | |
tree | 341790615b94f2f742bc505790dc9e6d3e20dc8c /lib/diameter/src/base/diameter_watchdog.erl | |
parent | d9ca987b0440662816589895bb5adf6f27322a25 (diff) | |
parent | d6b3b84abeef4a323a3ddfd89c9a6b131bcd11fc (diff) | |
download | otp-5782c3aad85c5c1e644d160504d9c8d27ffdc2f1.tar.gz otp-5782c3aad85c5c1e644d160504d9c8d27ffdc2f1.tar.bz2 otp-5782c3aad85c5c1e644d160504d9c8d27ffdc2f1.zip |
Merge branch 'anders/diameter/rc_counters/OTP-11891' into maint
* anders/diameter/rc_counters/OTP-11891:
Count result codes in CEA/DWA/DPA
Diffstat (limited to 'lib/diameter/src/base/diameter_watchdog.erl')
-rw-r--r-- | lib/diameter/src/base/diameter_watchdog.erl | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/diameter/src/base/diameter_watchdog.erl b/lib/diameter/src/base/diameter_watchdog.erl index 017a520467..079e1c0bc2 100644 --- a/lib/diameter/src/base/diameter_watchdog.erl +++ b/lib/diameter/src/base/diameter_watchdog.erl @@ -475,7 +475,6 @@ encode(dwr = M, Dict0, Mask) -> #diameter_packet{bin = Bin} = diameter_codec:encode(Dict0, Pkt), Bin; - encode(dwa, Dict0, #diameter_packet{header = H, transport_data = TD} = ReqPkt) -> AnsPkt = #diameter_packet{header @@ -563,13 +562,21 @@ recv(Name, Pkt, S) -> rcv('DWR', Pkt, #watchdog{transport = TPid, dictionary = Dict0}) -> - send(TPid, {send, encode(dwa, Dict0, Pkt)}), + EPkt = encode(dwa, Dict0, Pkt), + diameter_traffic:incr_A(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); + rcv(N, _, _) when N == 'CER'; N == 'CEA'; - N == 'DWA'; N == 'DPR'; N == 'DPA' -> false; |