diff options
author | Anders Svensson <[email protected]> | 2012-08-27 09:36:51 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2012-08-27 09:36:51 +0200 |
commit | a918d79217b65a638ff5f5e4bf88e0a18af3c691 (patch) | |
tree | 8e236a576c35db72480bf7296ea59cafca5dc12c /lib/diameter/src | |
parent | aa62ff77cee327bedb42a8d43320c0c40c99f3d3 (diff) | |
download | otp-a918d79217b65a638ff5f5e4bf88e0a18af3c691.tar.gz otp-a918d79217b65a638ff5f5e4bf88e0a18af3c691.tar.bz2 otp-a918d79217b65a638ff5f5e4bf88e0a18af3c691.zip |
Maintain pid of started transport process in process dictionary
Diffstat (limited to 'lib/diameter/src')
-rw-r--r-- | lib/diameter/src/base/diameter_peer_fsm.erl | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/diameter/src/base/diameter_peer_fsm.erl b/lib/diameter/src/base/diameter_peer_fsm.erl index 638d905195..bbda62c32b 100644 --- a/lib/diameter/src/base/diameter_peer_fsm.erl +++ b/lib/diameter/src/base/diameter_peer_fsm.erl @@ -210,11 +210,14 @@ q_next(TPid, Addrs0, Tmo, {_,_,_,_} = Data) -> send_after(Tmo, {connection_timeout, TPid}), putr(?Q_KEY, {Addrs0, Tmo, Data}). -%% Connection has been established: retain the started module/config -%% in the process dictionary. -keep_transport() -> +%% Connection has been established: retain the started +%% pid/module/config in the process dictionary. This is a part of the +%% interface defined by this module, so that the transport pid can be +%% found when constructing service_info (in order to extract further +%% information from it). +keep_transport(TPid) -> {_, _, {{_,_,_} = T, _, _, _}} = eraser(?Q_KEY), - putr(?START_KEY, T). + putr(?START_KEY, {TPid, T}). send_after(infinity, _) -> ok; @@ -291,7 +294,7 @@ transition({diameter, {TPid, connected, Remote}}, = S) -> 'Wait-Conn-Ack' = PS, %% assert connect = M, %% - keep_transport(), + keep_transport(TPid), send_CER(S#state{mode = {M, Remote}}); %% Connection from peer. @@ -303,7 +306,7 @@ transition({diameter, {TPid, connected}}, = S) -> 'Wait-Conn-Ack' = PS, %% assert accept = M, %% - keep_transport(), + keep_transport(TPid), Pid ! {accepted, self()}, start_timer(S#state{state = recv_CER}); |