aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2011-09-27 11:41:46 +0200
committerAnders Svensson <[email protected]>2011-09-27 11:41:46 +0200
commit6d31ccf58efcffc53a949fbdd0a217d6c3ac7058 (patch)
tree2cbfa24a9c013f4cfb2b853bdf10a35b438879f6
parent460fb6e0f336a56e1b20a1bf8d4d82125b7b626f (diff)
parent322885a2c501384bb5c83d391d0c3fa91d82d5da (diff)
downloadotp-6d31ccf58efcffc53a949fbdd0a217d6c3ac7058.tar.gz
otp-6d31ccf58efcffc53a949fbdd0a217d6c3ac7058.tar.bz2
otp-6d31ccf58efcffc53a949fbdd0a217d6c3ac7058.zip
Merge branch 'anders/diameter/send_anything/OTP-9581' into dev
* anders/diameter/send_anything/OTP-9581: Fix sending of messages of arbitrary form
-rw-r--r--lib/diameter/src/app/diameter_service.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/diameter/src/app/diameter_service.erl b/lib/diameter/src/app/diameter_service.erl
index 6498143e2e..421e36ccf5 100644
--- a/lib/diameter/src/app/diameter_service.erl
+++ b/lib/diameter/src/app/diameter_service.erl
@@ -2526,7 +2526,7 @@ str(T) ->
%% get_avp_value/3
%%
-%% Support outgoing messages in one of three forms:
+%% Find an AVP in a message of one of three forms:
%%
%% - a message record (as generated from a .dia spec) or
%% - a list of an atom message name followed by 2-tuple, avp name/value pairs.
@@ -2558,8 +2558,9 @@ get_avp_value(_, Name, [_MsgName | Avps]) ->
undefined
end;
-get_avp_value(Dict, Name, Rec)
- when is_tuple(Rec) ->
+%% Message is typically a record but not necessarily: diameter:call/4
+%% can be passed an arbitrary term.
+get_avp_value(Dict, Name, Rec) ->
try
Dict:'#get-'(Name, Rec)
catch