diff options
author | Anders Svensson <[email protected]> | 2013-06-14 16:56:41 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2013-06-14 16:56:41 +0200 |
commit | bda0f0b1a0b990b095fc46c3a5c7085f69f08480 (patch) | |
tree | f11c2fd743292467504bccc98698b78d5e91ffe9 /lib/diameter/src/base/diameter_capx.erl | |
parent | 710b07ca18417976459335a8b0b81a6f6aa82699 (diff) | |
parent | c2d5c74d231b62cc511f3927201ac6578844b578 (diff) | |
download | otp-bda0f0b1a0b990b095fc46c3a5c7085f69f08480.tar.gz otp-bda0f0b1a0b990b095fc46c3a5c7085f69f08480.tar.bz2 otp-bda0f0b1a0b990b095fc46c3a5c7085f69f08480.zip |
Merge branch 'anders/diameter/vendor_specific_function_clause/OTP-11165' into maint
* anders/diameter/vendor_specific_function_clause/OTP-11165:
Fix list-valued Vendor-Specific-Application-Id config
Diffstat (limited to 'lib/diameter/src/base/diameter_capx.erl')
-rw-r--r-- | lib/diameter/src/base/diameter_capx.erl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/diameter/src/base/diameter_capx.erl b/lib/diameter/src/base/diameter_capx.erl index 4b821f5139..1a931a9854 100644 --- a/lib/diameter/src/base/diameter_capx.erl +++ b/lib/diameter/src/base/diameter_capx.erl @@ -419,12 +419,13 @@ app_union(#diameter_caps{auth_application_id = U, vendor_specific_application_id = V}) -> set_list(U ++ C ++ lists:flatmap(fun vsa_apps/1, V)). -vsa_apps([_ | [_,_] = Ids]) -> - lists:append(Ids); +vsa_apps(Vals) + when is_list(Vals) -> + lists:flatmap(fun({'Vendor-Id', _}) -> []; ({_, Ids}) -> Ids end, Vals); vsa_apps(Rec) when is_tuple(Rec) -> - [_|T] = tuple_to_list(Rec), - vsa_apps(T). + [_Name, _VendorId | Idss] = tuple_to_list(Rec), + lists:append(Idss). %% It's a configuration error for a locally advertised application not %% to be represented in Apps. Don't just match on lists:keyfind/3 in |