diff options
author | Anders Svensson <[email protected]> | 2011-09-25 16:49:29 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2011-09-26 17:01:26 +0200 |
commit | 322885a2c501384bb5c83d391d0c3fa91d82d5da (patch) | |
tree | 9f2080a1daa0d2eafb27acaaa6cb68783d6512fc /lib/diameter/src/app | |
parent | 97f3a064f27843a9f825210c1c7a27075b7b3ad7 (diff) | |
download | otp-322885a2c501384bb5c83d391d0c3fa91d82d5da.tar.gz otp-322885a2c501384bb5c83d391d0c3fa91d82d5da.tar.bz2 otp-322885a2c501384bb5c83d391d0c3fa91d82d5da.zip |
Fix sending of messages of arbitrary form
diameter:call/4 can be passed anything, as long as the subsequent
prepare_request callback returns a term that can be encoded.
Diffstat (limited to 'lib/diameter/src/app')
-rw-r--r-- | lib/diameter/src/app/diameter_service.erl | 7 |
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 63b0649dc4..a7fe733340 100644 --- a/lib/diameter/src/app/diameter_service.erl +++ b/lib/diameter/src/app/diameter_service.erl @@ -2561,7 +2561,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. @@ -2593,8 +2593,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 |