aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_peer_fsm.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2012-08-23 20:53:53 +0200
committerAnders Svensson <[email protected]>2012-08-24 13:12:58 +0200
commite93b194345b563e9f5bc6264e577ef839d2f1ab2 (patch)
tree554d080fe3f324c43e96b35423da4a0b89ad4fb1 /lib/diameter/src/base/diameter_peer_fsm.erl
parentcfea5eea406ba3af96588ff458e55de9a149d9c5 (diff)
downloadotp-e93b194345b563e9f5bc6264e577ef839d2f1ab2.tar.gz
otp-e93b194345b563e9f5bc6264e577ef839d2f1ab2.tar.bz2
otp-e93b194345b563e9f5bc6264e577ef839d2f1ab2.zip
Statistics fixes
Statistics are deleted as a consequence of diameter:remove_transport/2.
Diffstat (limited to 'lib/diameter/src/base/diameter_peer_fsm.erl')
-rw-r--r--lib/diameter/src/base/diameter_peer_fsm.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/diameter/src/base/diameter_peer_fsm.erl b/lib/diameter/src/base/diameter_peer_fsm.erl
index 99644814d2..433983c1cb 100644
--- a/lib/diameter/src/base/diameter_peer_fsm.erl
+++ b/lib/diameter/src/base/diameter_peer_fsm.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -120,11 +120,10 @@
%% specified on the transport in question. Check here that the list is
%% still non-empty.
-start({_, Ref} = Type, Opts, #diameter_service{applications = Apps} = Svc) ->
+start({_,_} = Type, Opts, #diameter_service{applications = Apps} = Svc) ->
[] /= Apps orelse ?ERROR({no_apps, Type, Opts}),
T = {self(), Type, Opts, Svc},
{ok, Pid} = diameter_peer_fsm_sup:start_child(T),
- diameter_stats:reg(Pid, Ref),
Pid.
start_link(T) ->
@@ -146,6 +145,7 @@ init(T) ->
i({WPid, T, Opts, #diameter_service{capabilities = Caps} = Svc0}) ->
putr(dwa, dwa(Caps)),
{M, Ref} = T,
+ diameter_stats:reg(Ref),
{[Ts], Rest} = proplists:split(Opts, [capabilities_cb]),
putr(capabilities_cb, {Ref, [F || {_,F} <- Ts]}),
{ok, TPid, Svc} = start_transport(T, Rest, Svc0),