forked from erlang/signerl
CCO: handle 'dialogue-terminated' gracefully
This commit is contained in:
parent
f43bffe405
commit
c956b44d97
|
@ -122,8 +122,9 @@ handle_cast('dialogue-terminated', State) ->
|
|||
% * automatically released
|
||||
% if any ISM active, terminate ISM
|
||||
% * ISMs are linked, they should terminate
|
||||
terminate_ISMs(State#state.ism),
|
||||
% terminate
|
||||
{stop, dialogue_terminated, State};
|
||||
{stop, normal, State};
|
||||
|
||||
% from TCL -> CHA (CCO): TC-RESULT-{L,NL}, U-ERROR
|
||||
handle_cast({'TC', Req, request, Param}, State) when
|
||||
|
@ -277,6 +278,12 @@ terminate_active_ISM(ISMs, InvId) ->
|
|||
ISMs
|
||||
end.
|
||||
|
||||
terminate_ISMs([]) ->
|
||||
ok;
|
||||
terminate_ISMs([{_Id, ISM}|Tail]) ->
|
||||
gen_fsm:send_event(ISM, terminate),
|
||||
terminate_ISMs(Tail).
|
||||
|
||||
% Convert from user-visible primitive records to asn1ct-generated record
|
||||
uprim_to_asn_rec(Uprim) when is_record(Uprim, 'TC-INVOKE') ->
|
||||
{invoke, #'Invoke'{invokeId = inv_id(Uprim#'TC-INVOKE'.invokeID),
|
||||
|
|
Loading…
Reference in New Issue