DHA: Store TR-END record in loop state on TC-END request

We need to put the TR-END record in the loop data state once we receive
the TC-END.req from TCU, even in 'basic' termination mode.  Only this
way, code in the wait_for_end_components can actually access/use that
record.
master
Harald Welte 10 years ago
parent d5260e0a5d
commit a7c2afc83e
  1. 10
      TCAP/src/ITU/tcap_dha_fsm.erl

@ -623,14 +623,14 @@ active({'TC', 'CONTINUE', request, ContParms}, State) when is_record(ContParms,
%% reference: Figure A.5/Q.774 (sheet 9 of 11)
%% TC-END request from TCU
active({'TC', 'END', request, EndParms}, State) when is_record(EndParms, 'TC-END') ->
TrParms = #'TR-END'{qos = EndParms#'TC-END'.qos,
transactionID = State#state.otid,
termination = EndParms#'TC-END'.termination},
NewState = State#state{parms = TrParms},
%% Prearranged end?
case EndParms#'TC-END'.termination of
prearranged ->
%% TR-END request to TSL
TrParms = #'TR-END'{qos = EndParms#'TC-END'.qos,
transactionID = State#state.otid,
termination = EndParms#'TC-END'.termination},
NewState = State#state{parms = TrParms},
gen_server:cast(NewState#state.tco, {'TR', 'END', request, TrParms}),
%% Dialogue terminated to CHA
gen_server:cast(NewState#state.cco, 'dialogue-terminated'),
@ -640,7 +640,7 @@ active({'TC', 'END', request, EndParms}, State) when is_record(EndParms, 'TC-END
%% Request component to CHA
gen_server:cast(State#state.cco, 'request-components'),
%% Process components
{next_state, wait_for_end_components, State}
{next_state, wait_for_end_components, NewState}
end;
%% reference: Figuer A.5/Q774 (sheet 10 of 11)

Loading…
Cancel
Save