diff options
author | Anders Svensson <[email protected]> | 2011-12-20 14:52:34 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2011-12-20 14:52:34 +0100 |
commit | 919565a8c1288cf56b0e421ca9fa4b53cac3910c (patch) | |
tree | d527f6eda56aaf3d6c2042ca404b48c35b9f1e4a /lib/diameter/src/base/diameter_service.erl | |
parent | 981b5b2cff643a069214be0bfb2cdc284e9ed18d (diff) | |
parent | 58336ee5c613de56f6d69562cd59b651eef734f0 (diff) | |
download | otp-919565a8c1288cf56b0e421ca9fa4b53cac3910c.tar.gz otp-919565a8c1288cf56b0e421ca9fa4b53cac3910c.tar.bz2 otp-919565a8c1288cf56b0e421ca9fa4b53cac3910c.zip |
Merge branch 'maint'
* maint: (25 commits)
Install example dictionaries
Move example code to examples/code
Move example dictionaries to examples/dict
Set name/prefix at compilation, not in dictionaries
Add RFC 4004 (MIP) dictionary
Add RFC 4740 (SIP) dictionary
Add RFC 4072 (EAP) dictionary
Add RFC 4006 (CC) dictionary
Add RFC 4005 (NAS) dictionary
Add standards testcase to compiler suite
Remove {init,end}_per_group workaround
Use new syntax for specifying ct group properties
Increase timetrap in compiler suite
Minor capx suite tweaks
Minor makefile tweak
Remove trailing whitespace
Update skip condition in gen_sctp suite
Reintroduce gen_sctp suite
Remove delay from connect in transport suite
Add codec testcase for decode of unknown AVPs
...
Diffstat (limited to 'lib/diameter/src/base/diameter_service.erl')
-rw-r--r-- | lib/diameter/src/base/diameter_service.erl | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl index 0893956f97..3dfdcee2b2 100644 --- a/lib/diameter/src/base/diameter_service.erl +++ b/lib/diameter/src/base/diameter_service.erl @@ -629,10 +629,6 @@ insert(Tbl, Rec) -> ets:insert(Tbl, Rec), Rec. -monitor(Pid) -> - erlang:monitor(process, Pid), - Pid. - %% Using the process dictionary for the callback state was initially %% just a way to make what was horrendous trace (big state record and %% much else everywhere) somewhat more readable. There's not as much @@ -814,10 +810,10 @@ start(Ref, Type, Opts, #state{peerT = PeerT, service = Svc}) when Type == connect; Type == accept -> - Pid = monitor(s(Type, Ref, {ConnT, - Opts, - SvcName, - merge_service(Opts, Svc)})), + Pid = s(Type, Ref, {ConnT, + Opts, + SvcName, + merge_service(Opts, Svc)}), insert(PeerT, #peer{pid = Pid, type = Type, ref = Ref, @@ -830,7 +826,13 @@ start(Ref, Type, Opts, #state{peerT = PeerT, %% callbacks. s(Type, Ref, T) -> - diameter_watchdog:start({Type, Ref}, T). + case diameter_watchdog:start({Type, Ref}, T) of + {_MRef, Pid} -> + Pid; + Pid when is_pid(Pid) -> %% from old code + erlang:monitor(process, Pid), + Pid + end. %% merge_service/2 |