aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2012-08-27 12:53:24 +0200
committerAnders Svensson <[email protected]>2012-08-27 14:31:58 +0200
commit48d846f8ec8120e6351c10681a46e874a0546918 (patch)
treef5f3b45a32125690d920e0e42662bba058dc7541
parent158d95e6b8575be8983ae6024ffa85c639ecdfda (diff)
downloadotp-48d846f8ec8120e6351c10681a46e874a0546918.tar.gz
otp-48d846f8ec8120e6351c10681a46e874a0546918.tar.bz2
otp-48d846f8ec8120e6351c10681a46e874a0546918.zip
Include transport-specific service info
-rw-r--r--lib/diameter/src/base/diameter_service.erl13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl
index 6aff03ec1d..f586cef11a 100644
--- a/lib/diameter/src/base/diameter_service.erl
+++ b/lib/diameter/src/base/diameter_service.erl
@@ -2976,10 +2976,21 @@ wd_state(?STATE_DOWN) ->
info_conn([#conn{pid = Pid, apps = SApps, caps = Caps, started = T}]) ->
[{peer, {Pid, T}},
{apps, SApps},
- {caps, info_caps(Caps)}];
+ {caps, info_caps(Caps)}
+ | try [{port, info_port(Pid)}] catch _:_ -> [] end];
info_conn([] = No) ->
No.
+%% Extract information that the processes involved are expected to
+%% "publish" in their process dictionaries. Simple but backhanded.
+info_port(Pid) ->
+ {_, PD} = process_info(Pid, dictionary),
+ {_, T} = lists:keyfind({diameter_peer_fsm, start}, 1, PD),
+ {TPid, {_Type, TMod, _Cfg}} = T,
+ {_, TD} = process_info(TPid, dictionary),
+ {_, Data} = lists:keyfind({TMod, info}, 1, TD),
+ [{owner, TPid}, {module, TMod} | [_|_] = TMod:info(Data)].
+
%% Use the fields names from diameter_caps instead of
%% diameter_base_CER to distinguish between the 2-tuple values
%% compared to the single capabilities values. Note also that the