aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_service.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2012-12-06 18:26:06 +0100
committerAnders Svensson <[email protected]>2012-12-10 12:42:48 +0100
commitaf3b1ce866a16c38d1b3f1452d75bcacc6635e9b (patch)
tree634606c9da763a7a3f7760a33c7e3f475b15b969 /lib/diameter/src/base/diameter_service.erl
parentd5de2e1ffd6403f5d7ec62e6ce8da508e1cb1239 (diff)
downloadotp-af3b1ce866a16c38d1b3f1452d75bcacc6635e9b.tar.gz
otp-af3b1ce866a16c38d1b3f1452d75bcacc6635e9b.tar.bz2
otp-af3b1ce866a16c38d1b3f1452d75bcacc6635e9b.zip
Fix setting of T flag at failover
This seems to have been broken at some point before diameter was included in OTP, prior to R14B03.
Diffstat (limited to 'lib/diameter/src/base/diameter_service.erl')
-rw-r--r--lib/diameter/src/base/diameter_service.erl10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl
index a4a0b80348..91384b8b91 100644
--- a/lib/diameter/src/base/diameter_service.erl
+++ b/lib/diameter/src/base/diameter_service.erl
@@ -1703,16 +1703,20 @@ send(Pid, Pkt) ->
%% retransmit/4
retransmit({TPid, Caps, #diameter_app{alias = Alias} = App} = T,
- #request{app = Alias, packet = Pkt}
+ #request{app = Alias, packet = Pkt0}
= Req,
SvcName,
Timeout) ->
- have_request(Pkt, TPid) %% Don't failover to a peer we've
+ have_request(Pkt0, TPid) %% Don't failover to a peer we've
andalso ?THROW(timeout), %% already sent to.
+ #diameter_packet{header = Hdr0} = Pkt0,
+ Hdr = Hdr0#diameter_header{is_retransmitted = true},
+ Pkt = Pkt0#diameter_packet{header = Hdr},
+
resend_req(cb(App, prepare_retransmit, [Pkt, SvcName, {TPid, Caps}]),
T,
- Req,
+ Req#request{packet = Pkt},
Timeout,
[]).