invocation supervisor: correctly call ISM

This commit is contained in:
Harald Welte 2011-12-17 17:22:55 +01:00
parent 9cb1851b3b
commit 205f585435
1 changed files with 4 additions and 5 deletions

View File

@ -46,11 +46,10 @@
%% call backs needed for supervisor behaviour %% call backs needed for supervisor behaviour
-export([init/1]). -export([init/1]).
init([USAP, InvokeID]) -> init([USAP, DlgId, InvokeID, OpClass, Timeout]) ->
Name = list_to_atom("tcap_ism_" ++ integer_to_list(InvokeID)), StartArgs = [USAP, DlgId, InvokeID, OpClass, Timeout],
StartArgs = [{local, Name}, tcap_ism_fsm, [USAP, InvokeID], []], StartFunc = {tcap_ism_fsm, start_link, StartArgs},
StartFunc = {gen_fsm, start_link, StartArgs}, ChildSpec = {ism, StartFunc, temporary, 4000, worker,
ChildSpec = {Name, StartFunc, temporary, 4000, worker,
[tcap_ism_sup]}, [tcap_ism_sup]},
{ok,{{one_for_all, 0, 1}, [ChildSpec]}}. {ok,{{one_for_all, 0, 1}, [ChildSpec]}}.