forked from erlang/signerl
DHA: No need for passing PID of dialogue_sup into DHA
This commit is contained in:
parent
4ab9bffba2
commit
bedd015b07
|
@ -81,9 +81,9 @@
|
|||
|
||||
%% Start the Dialogue Handler (DHA) process
|
||||
%% reference: Figure A.5/Q.774 (sheet 1 of 11)
|
||||
init({USAP, DialogueID, TCO, Supervisor}) ->
|
||||
init({USAP, DialogueID, TCO, undefined, Supervisor});
|
||||
init({USAP, DialogueID, TCO, SupId, Supervisor}) ->
|
||||
init({USAP, DialogueID, TCO}) ->
|
||||
init({USAP, DialogueID, TCO, undefined});
|
||||
init({USAP, DialogueID, TCO, SupId}) ->
|
||||
ets:insert(tcap_dha, {DialogueID, self()}),
|
||||
CCO = list_to_atom("tcap_cco_" ++ integer_to_list(DialogueID)),
|
||||
process_flag(trap_exit, true),
|
||||
|
|
|
@ -60,7 +60,7 @@ gen_comp_sup_spec(USAP, DialogueID) ->
|
|||
%% when started from TCO
|
||||
init({USAP, LocalTID, TCO, SupId}) ->
|
||||
StartName = list_to_atom("tcap_dha_" ++ integer_to_list(LocalTID)),
|
||||
StartArgs = [{local, StartName}, tcap_dha_fsm, [{USAP, LocalTID, TCO, SupId, self()}], []],
|
||||
StartArgs = [{local, StartName}, tcap_dha_fsm, [{USAP, LocalTID, TCO, SupId}], []],
|
||||
StartFunc = {gen_fsm, start_link, StartArgs},
|
||||
ChildSpecComp = gen_comp_sup_spec(USAP, LocalTID),
|
||||
ChildSpec = {dha, StartFunc, permanent, 4000, worker,
|
||||
|
@ -70,7 +70,7 @@ init({USAP, LocalTID, TCO, SupId}) ->
|
|||
%% when started from TSM
|
||||
init({USAP, LocalTID, TCO}) ->
|
||||
StartName = list_to_atom("tcap_dha_" ++ integer_to_list(LocalTID)),
|
||||
StartArgs = [{local, StartName}, tcap_dha_fsm, {USAP, LocalTID, TCO, self()}, []],
|
||||
StartArgs = [{local, StartName}, tcap_dha_fsm, {USAP, LocalTID, TCO}, []],
|
||||
StartFunc = {gen_fsm, start_link, StartArgs},
|
||||
ChildSpecComp = gen_comp_sup_spec(USAP, LocalTID),
|
||||
ChildSpec = {dha, StartFunc, permanent, 4000, worker,
|
||||
|
|
Loading…
Reference in New Issue