diff options
author | Harald Welte <laforge@gnumonks.org> | 2012-01-24 23:18:29 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-01-24 23:18:29 +0100 |
commit | 66ad6863924dc46dcefd9fdf966639e0d309e12f (patch) | |
tree | 8ba727879edd1f6cad9f20aabd415bc3a06df1e7 | |
parent | 5802031adc0b38e7a9ad93f1c36df70071ffc51f (diff) |
SCCP SCOC: handle CC, CREF and RLSD in conn_out_pending state
-rw-r--r-- | src/sccp_scoc.erl | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/sccp_scoc.erl b/src/sccp_scoc.erl index 41237c1..d10490c 100644 --- a/src/sccp_scoc.erl +++ b/src/sccp_scoc.erl @@ -220,22 +220,33 @@ conn_pend_out(timeout, LoopDat) -> rel_res_disc_ind_idle_2(LoopDat); conn_pend_out(routing_failure, LoopDat) -> rel_res_disc_ind_idle_2(LoopDat); -conn_pend_out(released, LoopDat) -> +conn_pend_out(#primitive{subsystem = 'RCOC', gen_name = 'CONNECTION-MSG', + spec_name = indication, + parameters = #sccp_msg{msg_type = ?SCCP_MSGT_RLSD, + parameters = Params}}, LoopDat) -> gen_fsm:send_event(LoopDat#state.scrc_pid, osmo_util:make_prim('OCRC', 'RELEASE COMPLETE', indication)), rel_res_disc_ind_idle_2(LoopDat); % other N-PDU Type conn_pend_out(other_npdu_type, LoopDat) -> rel_res_disc_ind_idle_2(LoopDat); -conn_pend_out(connection_refused, LoopDat) -> +conn_pend_out(#primitive{subsystem = 'RCOC', gen_name = 'CONNECTION-MSG', + spec_name = indication, + parameters = #sccp_msg{msg_type = ?SCCP_MSGT_CREF, + parameters = Params}}, LoopDat) -> rel_res_disc_ind_idle_2(LoopDat); -conn_pend_out(connection_confirm, LoopDat) -> +conn_pend_out(#primitive{subsystem = 'RCOC', gen_name = 'CONNECTION-MSG', + spec_name = indication, + parameters = #sccp_msg{msg_type = ?SCCP_MSGT_CC, + parameters = Params}}, LoopDat) -> % start inactivity timers LoopDat1 = start_inact_timers(LoopDat), % assign protocol class and associate remote reference to connection + SrcLocalRef = proplists:get_value(src_local_ref, Params), + LoopDat2 = LoopDat1#state{remote_reference = SrcLocalRef}, % send N-CONNECT.conf to user - send_user(LoopDat1, #primitive{subsystem = 'N', gen_name = 'CONNECT', - spec_name = confirm}), + send_user(LoopDat2, #primitive{subsystem = 'N', gen_name = 'CONNECT', + spec_name = confirm, parameters = Params}), {next_state, active, LoopDat1}. stop_c_tmr_rel_idle_5(LoopDat) -> |