aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2012-10-09 02:07:42 +0200
committerAnders Svensson <[email protected]>2012-10-09 02:13:50 +0200
commit3e936e07da7f0c949d2ba08ee7a8d3d533dc27db (patch)
tree1eb254df8b096e6ae8724a22cd7192828dbf0715
parente28ced7b0be4282063ca111782f13f4ba4f6c3ac (diff)
downloadotp-3e936e07da7f0c949d2ba08ee7a8d3d533dc27db.tar.gz
otp-3e936e07da7f0c949d2ba08ee7a8d3d533dc27db.tar.bz2
otp-3e936e07da7f0c949d2ba08ee7a8d3d533dc27db.zip
Use packet callbacks in traffic suite
-rw-r--r--lib/diameter/test/diameter_traffic_SUITE.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl
index 669918f757..dd07679764 100644
--- a/lib/diameter/test/diameter_traffic_SUITE.erl
+++ b/lib/diameter/test/diameter_traffic_SUITE.erl
@@ -624,7 +624,10 @@ prepare_request(Pkt, ?CLIENT, {_Ref, Caps}, Name) ->
{send, prepare(Pkt, Caps, Name)}.
prepare_request(Pkt, ?CLIENT, {_Ref, Caps}, send_detach, _) ->
- {send, prepare(Pkt, Caps)}.
+ {eval_packet, {send, prepare(Pkt, Caps)}, [fun log/2, detach]}.
+
+log(#diameter_packet{} = P, T) ->
+ io:format("~p: ~p~n", [T,P]).
prepare(Pkt, Caps, send_unsupported) ->
Req = prepare(Pkt, Caps),
@@ -738,7 +741,7 @@ handle_request(#diameter_packet{msg = M}, ?SERVER, {_Ref, Caps}) ->
request(#diameter_base_accounting_ACR{'Accounting-Record-Number' = 0},
_) ->
- {protocol_error, ?INVALID_AVP_BITS};
+ {eval_packet, {protocol_error, ?INVALID_AVP_BITS}, [fun log/2, invalid]};
request(#diameter_base_accounting_ACR{'Session-Id' = SId,
'Accounting-Record-Type' = RT,