aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_capx.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/diameter/src/base/diameter_capx.erl')
-rw-r--r--lib/diameter/src/base/diameter_capx.erl12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/diameter/src/base/diameter_capx.erl b/lib/diameter/src/base/diameter_capx.erl
index 9efe28b9e0..715b15628c 100644
--- a/lib/diameter/src/base/diameter_capx.erl
+++ b/lib/diameter/src/base/diameter_capx.erl
@@ -282,17 +282,9 @@ cs(LS, RS) ->
%% CER is a subset of CEA, the latter adding Result-Code and a few
%% more AVP's.
cea_from_cer(CER, Dict) ->
- lists:foldl(fun(F,A) -> to_cea(CER, F, A, Dict) end,
- Dict:'#new-'(diameter_base_CEA),
- Dict:'#info-'(diameter_base_CER, fields)).
+ [diameter_base_CER | Values] = Dict:'#get-'(CER),
+ Dict:'#set-'(Values, Dict:'#new-'(diameter_base_CEA)).
-to_cea(CER, Field, CEA, Dict) ->
- try Dict:'#get-'(Field, CER) of
- V -> Dict:'#set-'({Field, V}, CEA)
- catch
- error: _ -> CEA
- end.
-
%% rCEA/3
rCEA(CEA, #diameter_service{capabilities = LCaps} = Svc, Dict) ->