aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2012-08-28 00:41:27 +0200
committerAnders Svensson <[email protected]>2012-08-28 00:44:30 +0200
commit858b3c001b895866d463eff529f9c6cc3b817a58 (patch)
tree47f30611dfaf620d10d8a256d64c5c5c95abeaaf /lib
parent97068153190f9197ecfe05a7458eb3c6d28694b4 (diff)
downloadotp-858b3c001b895866d463eff529f9c6cc3b817a58.tar.gz
otp-858b3c001b895866d463eff529f9c6cc3b817a58.tar.bz2
otp-858b3c001b895866d463eff529f9c6cc3b817a58.zip
Tweak info presentation
Diffstat (limited to 'lib')
-rw-r--r--lib/diameter/src/base/diameter_service.erl14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl
index a4f4382697..a44ab283ed 100644
--- a/lib/diameter/src/base/diameter_service.erl
+++ b/lib/diameter/src/base/diameter_service.erl
@@ -3016,7 +3016,9 @@ info_port(Pid) ->
{TPid, {_Type, TMod, _Cfg}} = T,
{_, TD} = process_info(TPid, dictionary),
{_, Data} = lists:keyfind({TMod, info}, 1, TD),
- [{owner, TPid}, {module, TMod} | [_|_] = TMod:info(Data)].
+ [{owner, TPid},
+ {module, TMod}
+ | try TMod:info(Data) catch _:_ -> [] end].
%% Use the fields names from diameter_caps instead of
%% diameter_base_CER to distinguish between the 2-tuple values
@@ -3029,14 +3031,8 @@ info_caps(#diameter_caps{} = C) ->
info_apps(#state{service = #diameter_service{applications = Apps}}) ->
lists:map(fun mk_app/1, Apps).
-mk_app(#diameter_app{alias = Alias,
- dictionary = Dict,
- module = ModX,
- id = Id}) ->
- [{alias, Alias},
- {dictionary, Dict},
- {module, ModX},
- {id, Id}].
+mk_app(#diameter_app{} = A) ->
+ lists:zip(record_info(fields, diameter_app), tl(tuple_to_list(A))).
%% info_pending/1
%%