From c11f047bc88406c25c52ff57d1062906a0aeff07 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Sun, 4 Dec 2011 12:38:43 +0100 Subject: Fix interpretation of vendor id in @grouped A value is required to be the same as any specified with @avp_vendor_id but otherwise the two locations are equivalent. Both possibilities are allowed since @avp_vendor_id is required for AVPs of types other than Grouped (modulo it not really needing to exist at all: see commit 943266c9) and since the grammar parsed in @grouped (from RFC 3588) allows it. --- lib/diameter/test/diameter_compiler_SUITE.erl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/diameter/test') diff --git a/lib/diameter/test/diameter_compiler_SUITE.erl b/lib/diameter/test/diameter_compiler_SUITE.erl index a224a4f12e..cc4b1ddac5 100644 --- a/lib/diameter/test/diameter_compiler_SUITE.erl +++ b/lib/diameter/test/diameter_compiler_SUITE.erl @@ -136,6 +136,9 @@ [{"(Failed-AVP .*)>", "\\1 17>"}, {"^ *Failed-AVP .*$", "&V"}, {"@avp_types", "@avp_vendor_id 18 Failed-AVP\n&"}]}, + {ok, + [{"(Failed-AVP .*)>", "\\1 17>"}, + {"^ *Failed-AVP .*$", "&V"}]}, {message_name_already_defined, "CEA ::= .*:", "& 257 > {Result-Code}\n&"}, @@ -244,10 +247,10 @@ replace({E, RE, Repl}, Bin) -> replace({E, Mods}, Bin) -> B = iolist_to_binary(lists:foldl(fun re/2, Bin, Mods)), - case diameter_dict_util:parse(B, [{include, here()}]) of - {ok, Dict} when E == ok -> + case {E, diameter_dict_util:parse(B, [{include, here()}]), Mods} of + {ok, {ok, Dict}, _} -> Dict; - {error, {E,_} = T} -> + {_, {error, {E,_} = T}, _} -> S = diameter_dict_util:format_error(T), true = nochar($", S, E), true = nochar($', S, E), -- cgit v1.2.3