aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/diameter/include/diameter_gen.hrl10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/diameter/include/diameter_gen.hrl b/lib/diameter/include/diameter_gen.hrl
index e35d448754..99f5da5aee 100644
--- a/lib/diameter/include/diameter_gen.hrl
+++ b/lib/diameter/include/diameter_gen.hrl
@@ -173,7 +173,15 @@ pack_AVP(Name, #diameter_avp{name = AvpName,
value = Data}) ->
0 == avp_arity(Name, AvpName)
orelse ?THROW([known_avp_as_AVP, Name, AvpName, Data]),
- e(AvpName, [Data]).
+ e(AvpName, [Data]);
+
+%% The backdoor ...
+pack_AVP(_, {AvpName, Value}) ->
+ e(AvpName, [Value]);
+
+%% ... and the side door.
+pack_AVP(_Name, {_Dict, _AvpName, _Data}= T) ->
+ diameter_codec:pack_avp(#diameter_avp{data = T}).
%% ---------------------------------------------------------------------------
%% # decode_avps/2