diff options
author | Anders Svensson <[email protected]> | 2015-03-23 12:37:26 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2015-03-23 12:37:26 +0100 |
commit | 7d05e55951b4f3fc4af0febb965d3075e5ddf324 (patch) | |
tree | 481788ecb55b80ae8b29bb7cf6608d03fed36791 /lib/diameter/src/base/diameter_watchdog.erl | |
parent | 88c8959a685ee5c296d57e9d50de46dbb19cc1df (diff) | |
parent | 09e51b177e0b2c1528c99bdd1c354319e07bc421 (diff) | |
download | otp-7d05e55951b4f3fc4af0febb965d3075e5ddf324.tar.gz otp-7d05e55951b4f3fc4af0febb965d3075e5ddf324.tar.bz2 otp-7d05e55951b4f3fc4af0febb965d3075e5ddf324.zip |
Merge branch 'anders/diameter/dpr/OTP-12542' into maint
* anders/diameter/dpr/OTP-12542:
Discard CER or DWR sent with diameter:call/4
Allow DPR to be sent with diameter:call/4
Add transport_opt() dpa_timeout
Add testcase for sending DPR with diameter:call/4
Diffstat (limited to 'lib/diameter/src/base/diameter_watchdog.erl')
-rw-r--r-- | lib/diameter/src/base/diameter_watchdog.erl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/diameter/src/base/diameter_watchdog.erl b/lib/diameter/src/base/diameter_watchdog.erl index 67715906e8..ff51c6dcf7 100644 --- a/lib/diameter/src/base/diameter_watchdog.erl +++ b/lib/diameter/src/base/diameter_watchdog.erl @@ -333,8 +333,9 @@ transition({shutdown = T, Pid, Reason}, #watchdog{parent = Pid, send(TPid, {T, self(), Reason}), S#watchdog{shutdown = true}; -%% Transport is telling us that DPA has been sent in response to DPR: -%% its death should lead to ours. +%% Transport is telling us that DPA has been sent in response to DPR, +%% or that DPR has been explicitly sent: transport death should lead +%% to ours. transition({'DPR', TPid}, #watchdog{transport = TPid} = S) -> S#watchdog{shutdown = true}; @@ -550,7 +551,7 @@ send_watchdog(#watchdog{pending = false, ?LOG(send, 'DWR'), S#watchdog{pending = true}. -%% Dont' count encode errors since we don't expect any on DWR/DWA. +%% Don't count encode errors since we don't expect any on DWR/DWA. %% recv/3 @@ -591,9 +592,10 @@ rcv('DWA', Pkt, #watchdog{transport = TPid, rcv(N, _, _) when N == 'CER'; N == 'CEA'; - N == 'DPR'; - N == 'DPA' -> + N == 'DPR' -> false; +%% DPR can be sent explicitly with diameter:call/4. Only the +%% corresponding DPAs arrive here. rcv(_, Pkt, #watchdog{transport = TPid, dictionary = Dict0, |