make sure CCO correctly starts new ISM

This commit is contained in:
Harald Welte 2012-01-29 20:02:25 +01:00
parent 24b34f506a
commit 0b3d9b053c
2 changed files with 5 additions and 5 deletions

View File

@ -237,7 +237,7 @@ process_request_components([Head|Tail], State, AsnComps, ISMs) when
% if INVOKE component
% start ISM and store ISM
{ok, ISM} = tcap_invocation_sup:start_ism(Usap, DialogueId,
InvId, Class, Tout),
InvId, self(), Class, Tout),
% signal 'operation-sent' to ISM
gen_fsm:send_event(ISM, 'operation-sent'),
NewISMs = [{InvId, ISM}|ISMs];

View File

@ -47,15 +47,15 @@
-export([init/1]).
%% API to other modules
-export([start_ism/5, start_link/1]).
-export([start_ism/6, start_link/1]).
init([]) ->
{ok,{{one_for_all, 0, 1}, []}}.
start_ism(USAP, DlgId, InvokeID, OpClass, Timeout) ->
start_ism(USAP, DlgId, InvokeID, CcoPid, OpClass, Timeout) ->
SupRef = list_to_atom("tcap_invocation_sup_" ++ integer_to_list(DlgId)),
StartArgs = [USAP, DlgId, InvokeID, OpClass, Timeout],
StartFunc = {tcap_ism_fsm, start_link, StartArgs},
StartArgs = [USAP, DlgId, InvokeID, CcoPid, OpClass, Timeout],
StartFunc = {gen_fsm, start_link, [tcap_ism_fsm, StartArgs, [{debug,[trace]}]]},
ChildSpec = {ism, StartFunc, temporary, 4000, worker,
[tcap_ism_sup]},
supervisor:start_child(SupRef, ChildSpec).