aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2012-12-04 11:24:06 +0100
committerAnders Svensson <[email protected]>2013-01-15 18:23:03 +0100
commitad4ff34da1b772fedce20cc12c76c6b7190513e4 (patch)
treea9b1d244d038075e498287f84f085b63028c0d43 /lib/diameter/src
parentd5de2e1ffd6403f5d7ec62e6ce8da508e1cb1239 (diff)
downloadotp-ad4ff34da1b772fedce20cc12c76c6b7190513e4.tar.gz
otp-ad4ff34da1b772fedce20cc12c76c6b7190513e4.tar.bz2
otp-ad4ff34da1b772fedce20cc12c76c6b7190513e4.zip
Fix diameter_service:make_prepare_header/2
Fault caused the header of a [#diameter_header{} | Avps] request to be ignored if both end_to_end_id and hop_by_hop_id were undefined. Broken in commit bc87eb33.
Diffstat (limited to 'lib/diameter/src')
-rw-r--r--lib/diameter/src/base/diameter_service.erl11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl
index a4a0b80348..38c56f3f2d 100644
--- a/lib/diameter/src/base/diameter_service.erl
+++ b/lib/diameter/src/base/diameter_service.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -1457,7 +1457,7 @@ make_prepare_packet(Mask, #diameter_packet{header = Hdr} = Pkt) ->
make_prepare_packet(Mask, Msg) ->
make_prepare_packet(Mask, #diameter_packet{msg = Msg}).
-%% make_prepare_header/1
+%% make_prepare_header/2
make_prepare_header(Mask, undefined) ->
Seq = diameter_session:sequence(Mask),
@@ -1465,10 +1465,11 @@ make_prepare_header(Mask, undefined) ->
hop_by_hop_id = Seq});
make_prepare_header(Mask, #diameter_header{end_to_end_id = undefined,
- hop_by_hop_id = undefined}) ->
+ hop_by_hop_id = undefined}
+ = H) ->
Seq = diameter_session:sequence(Mask),
- make_prepare_header(#diameter_header{end_to_end_id = Seq,
- hop_by_hop_id = Seq});
+ make_prepare_header(H#diameter_header{end_to_end_id = Seq,
+ hop_by_hop_id = Seq});
make_prepare_header(Mask, #diameter_header{end_to_end_id = undefined} = H) ->
Seq = diameter_session:sequence(Mask),