aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2013-01-17 16:15:19 +0100
committerAnders Svensson <[email protected]>2013-01-17 16:15:19 +0100
commit2a6407b3f744ae3d170764eac9d9eb882148b898 (patch)
tree3ab81997d5478d6c7c9b32429fc7099520f1372a /lib/diameter
parent97b59417cce17f3f9febf95da26ac40ee96d02e2 (diff)
parent2b0c190aa88716b24866b0a751cfe6252348ab00 (diff)
downloadotp-2a6407b3f744ae3d170764eac9d9eb882148b898.tar.gz
otp-2a6407b3f744ae3d170764eac9d9eb882148b898.tar.bz2
otp-2a6407b3f744ae3d170764eac9d9eb882148b898.zip
Merge branch 'maint-r15'
Diffstat (limited to 'lib/diameter')
-rw-r--r--lib/diameter/doc/src/notes.xml16
-rw-r--r--lib/diameter/src/base/diameter.appup.src29
-rw-r--r--lib/diameter/src/base/diameter_service.erl2
-rw-r--r--lib/diameter/test/diameter_traffic_SUITE.erl33
-rw-r--r--lib/diameter/vsn.mk4
5 files changed, 57 insertions, 27 deletions
diff --git a/lib/diameter/doc/src/notes.xml b/lib/diameter/doc/src/notes.xml
index d448b01eba..d241e2bd19 100644
--- a/lib/diameter/doc/src/notes.xml
+++ b/lib/diameter/doc/src/notes.xml
@@ -42,6 +42,22 @@ first.</p>
<!-- ===================================================================== -->
+<section><title>Diameter 1.3.1</title>
+
+ <section><title>Known Bugs and Problems</title>
+ <list>
+ <item>
+ <p>
+ Fix function clause resulting from use of an eval
+ callback.</p>
+ <p>
+ Own Id: OTP-10685</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Diameter 1.3</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/diameter/src/base/diameter.appup.src b/lib/diameter/src/base/diameter.appup.src
index 5655f98c1b..a04a387918 100644
--- a/lib/diameter/src/base/diameter.appup.src
+++ b/lib/diameter/src/base/diameter.appup.src
@@ -2,7 +2,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
@@ -24,27 +24,9 @@
{"0.10", [{restart_application, diameter}]},
{"1.0", [{restart_application, diameter}]},
{"1.1", [{restart_application, diameter}]},
- {"1.2", [{load, diameter},
- {load, diameter_capx},
- {load, diameter_codec},
- {load, diameter_peer},
- {load, diameter_reg},
- %% order significant from here
- {load, diameter_session},
- {load, diameter_peer_fsm},
- {load, diameter_service},
- {load, diameter_watchdog},
- {load, diameter_config}]},
- {"1.2.1", [{load, diameter},
- {load, diameter_capx},
- {load, diameter_peer},
- {load, diameter_reg},
- %% order significant from here
- {load, diameter_session},
- {load, diameter_peer_fsm},
- {load, diameter_service},
- {load, diameter_watchdog},
- {load, diameter_config}]}
+ {"1.2", [{restart_application, diameter}]},
+ {"1.2.1", [{restart_application, diameter}]},
+ {"1.3", [{load_module, diameter_service}]}
],
[
{"0.9", [{restart_application, diameter}]},
@@ -52,6 +34,7 @@
{"1.0", [{restart_application, diameter}]},
{"1.1", [{restart_application, diameter}]},
{"1.2", [{restart_application, diameter}]},
- {"1.2.1", [{restart_application, diameter}]}
+ {"1.2.1", [{restart_application, diameter}]},
+ {"1.3", [{load_module, diameter_service}]}
]
}.
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl
index 0e43f19601..c0fccd8080 100644
--- a/lib/diameter/src/base/diameter_service.erl
+++ b/lib/diameter/src/base/diameter_service.erl
@@ -2054,7 +2054,7 @@ request_cb({eval_packet, RC, F}, App, Mask, T, TC, Fs, Pkt) ->
request_cb(RC, App, Mask, T, TC, [F|Fs], Pkt);
request_cb({eval, RC, F}, App, Mask, T, TC, Fs, Pkt) ->
- request_cb(RC, App, Mask, T, TC, Pkt, Fs),
+ request_cb(RC, App, Mask, T, TC, Fs, Pkt),
diameter_lib:eval(F).
%% protocol_error/5
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl
index 494dbca984..b41d1a6f5c 100644
--- a/lib/diameter/test/diameter_traffic_SUITE.erl
+++ b/lib/diameter/test/diameter_traffic_SUITE.erl
@@ -38,6 +38,7 @@
result_codes/1,
send_ok/1,
send_nok/1,
+ send_eval/1,
send_bad_answer/1,
send_arbitrary/1,
send_unknown/1,
@@ -212,6 +213,7 @@ end_per_testcase(_, _) ->
tc() ->
[send_ok,
send_nok,
+ send_eval,
send_bad_answer,
send_arbitrary,
send_unknown,
@@ -313,6 +315,14 @@ send_nok(Config) ->
#'diameter_base_answer-message'{'Result-Code' = ?INVALID_AVP_BITS}
= call(Config, Req).
+%% Send an ACR and expect success.
+send_eval(Config) ->
+ Req = ['ACR', {'Accounting-Record-Type', ?EVENT_RECORD},
+ {'Accounting-Record-Number', 3}],
+
+ #diameter_base_accounting_ACA{'Result-Code' = ?SUCCESS}
+ = call(Config, Req).
+
%% Send an accounting ACR that the server tries to answer with an
%% inappropriate header, resulting in no answer being sent and the
%% request timing out.
@@ -778,10 +788,12 @@ handle_request(#diameter_packet{header = H, msg = M}, ?SERVER, {_Ref, Caps}) ->
V = HI bsr B, %%
request(M, Caps).
+%% send_nok
request(#diameter_base_accounting_ACR{'Accounting-Record-Number' = 0},
_) ->
{eval_packet, {protocol_error, ?INVALID_AVP_BITS}, [fun log/2, invalid]};
+%% send_bad_answer
request(#diameter_base_accounting_ACR{'Session-Id' = SId,
'Accounting-Record-Type' = RT,
'Accounting-Record-Number' = 2 = RN},
@@ -797,9 +809,24 @@ request(#diameter_base_accounting_ACR{'Session-Id' = SId,
{reply, #diameter_packet{header = #diameter_header{is_error = true},%% not
msg = Ans}};
+%% send_eval
+request(#diameter_base_accounting_ACR{'Session-Id' = SId,
+ 'Accounting-Record-Type' = RT,
+ 'Accounting-Record-Number' = 3 = RN},
+ #diameter_caps{origin_host = {OH, _},
+ origin_realm = {OR, _}}) ->
+ Ans = ['ACA', {'Result-Code', ?SUCCESS},
+ {'Session-Id', SId},
+ {'Origin-Host', OH},
+ {'Origin-Realm', OR},
+ {'Accounting-Record-Type', RT},
+ {'Accounting-Record-Number', RN}],
+ {eval, {reply, Ans}, {erlang, now, []}};
+
+%% send_ok
request(#diameter_base_accounting_ACR{'Session-Id' = SId,
'Accounting-Record-Type' = RT,
- 'Accounting-Record-Number' = RN},
+ 'Accounting-Record-Number' = 1 = RN},
#diameter_caps{origin_host = {OH, _},
origin_realm = {OR, _}}) ->
{reply, ['ACA', {'Result-Code', ?SUCCESS},
@@ -819,16 +846,19 @@ request(#diameter_base_ASR{'Session-Id' = SId,
'Origin-Realm' = OR,
'AVP' = Avps}};
+%% send_noreply
request(#diameter_base_STR{'Termination-Cause' = T},
_Caps)
when T /= ?LOGOUT ->
discard;
+%% send_destination_5
request(#diameter_base_STR{'Destination-Realm'= R},
#diameter_caps{origin_realm = {OR, _}})
when R /= undefined, R /= OR ->
{protocol_error, ?REALM_NOT_SERVED};
+%% send_destination_6
request(#diameter_base_STR{'Destination-Host'= [H]},
#diameter_caps{origin_host = {OH, _}})
when H /= OH ->
@@ -842,6 +872,7 @@ request(#diameter_base_STR{'Session-Id' = SId},
'Origin-Host' = OH,
'Origin-Realm' = OR}};
+%% send_error
request(#diameter_base_RAR{}, _Caps) ->
receive after 2000 -> ok end,
{protocol_error, ?TOO_BUSY}.
diff --git a/lib/diameter/vsn.mk b/lib/diameter/vsn.mk
index c9f74ffcec..7b2208137b 100644
--- a/lib/diameter/vsn.mk
+++ b/lib/diameter/vsn.mk
@@ -2,7 +2,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
@@ -18,7 +18,7 @@
# %CopyrightEnd%
APPLICATION = diameter
-DIAMETER_VSN = 1.3
+DIAMETER_VSN = 1.3.1
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(DIAMETER_VSN)$(PRE_VSN)"