diff options
author | Anders Svensson <[email protected]> | 2016-05-04 23:27:02 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2016-05-04 23:46:38 +0200 |
commit | 18449b6bd35be4ad66ea7874a397029c8c920629 (patch) | |
tree | 6e716a900d5ee1d72f1a1fdac9874afed8dd6421 /lib/diameter/src/base/diameter.erl | |
parent | 2adc2c2385e849c5f5b55240cbf7b0e66d364e5c (diff) | |
download | otp-18449b6bd35be4ad66ea7874a397029c8c920629.tar.gz otp-18449b6bd35be4ad66ea7874a397029c8c920629.tar.bz2 otp-18449b6bd35be4ad66ea7874a397029c8c920629.zip |
Add diameter:peer_find/1
To return a peer_fsm/transport pair given one of them.
Diffstat (limited to 'lib/diameter/src/base/diameter.erl')
-rw-r--r-- | lib/diameter/src/base/diameter.erl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/diameter/src/base/diameter.erl b/lib/diameter/src/base/diameter.erl index b04697513e..e8f2f63f86 100644 --- a/lib/diameter/src/base/diameter.erl +++ b/lib/diameter/src/base/diameter.erl @@ -37,6 +37,7 @@ %% Information. -export([services/0, peer_info/1, + peer_find/1, service_info/2]). %% Start/stop the application. In a "real" application this should @@ -159,6 +160,17 @@ peer_info(PeerRef) -> diameter_service:peer_info(PeerRef). %% --------------------------------------------------------------------------- +%% peer_find/1 +%% --------------------------------------------------------------------------- + +-spec peer_find(peer_ref() | pid()) + -> {peer_ref(), pid()} + | false. + +peer_find(Pid) -> + diameter_peer_fsm:find(Pid). + +%% --------------------------------------------------------------------------- %% add_transport/3 %% --------------------------------------------------------------------------- |