aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2013-01-21 17:34:36 +0100
committerAnders Svensson <[email protected]>2013-02-08 19:28:46 +0100
commitf0a36c79af84c044ba04af3602506624a5ee8799 (patch)
tree010c75f2ef263fc666354276e3ce020fc0e87fbb /lib/diameter/test
parentd8ef1f220f1a85ff883fa288cd641430667525d7 (diff)
downloadotp-f0a36c79af84c044ba04af3602506624a5ee8799.tar.gz
otp-f0a36c79af84c044ba04af3602506624a5ee8799.tar.bz2
otp-f0a36c79af84c044ba04af3602506624a5ee8799.zip
Don't hardcode common dictionary
Instead, use whatever dictionary a transport has configured as supporting application id 0. This is to support the updated RFC 6733 dictionaries (which bring with them updated records) and also to be able to transparently support any changed semantics (eg. 5xxx in answer-message).
Diffstat (limited to 'lib/diameter/test')
-rw-r--r--lib/diameter/test/diameter_codec_test.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/diameter/test/diameter_codec_test.erl b/lib/diameter/test/diameter_codec_test.erl
index fbd38067a8..18bd2cc190 100644
--- a/lib/diameter/test/diameter_codec_test.erl
+++ b/lib/diameter/test/diameter_codec_test.erl
@@ -27,7 +27,8 @@
-include("diameter.hrl").
--define(BASE, diameter_gen_base_rfc3588).
+-define(RFC3588, diameter_gen_base_rfc3588).
+-define(RFC6733, diameter_gen_base_rfc6733).
-define(BOOL, [true, false]).
-define(A, list_to_atom).
@@ -158,7 +159,8 @@ gen(M, messages, {Name, Code, Flags, _, _}) ->
Name = case M:msg_name(Code, lists:member('REQ', Flags)) of
N when Name /= 'answer-message' ->
N;
- '' when Name == 'answer-message', M == ?BASE ->
+ '' when Name == 'answer-message', (M == ?RFC3588
+ orelse M == ?RFC6733) ->
Name
end,
[] = arity(M, Name, Rname);