diff options
author | Harald Welte <laforge@gnumonks.org> | 2012-01-28 16:17:00 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-01-28 16:17:00 +0100 |
commit | 58f820eb8e6aac9c262c56fb9b7e2e4b999ef268 (patch) | |
tree | ddd6bfab4928412bd81ab65bfc67d023aa1073b1 | |
parent | e698ae2b4c951f5984d493292df567764ffef153 (diff) |
SCOC: Handle IT message in active state
-rw-r--r-- | src/sccp_scoc.erl | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/sccp_scoc.erl b/src/sccp_scoc.erl index 9796cc9..07be510 100644 --- a/src/sccp_scoc.erl +++ b/src/sccp_scoc.erl @@ -404,6 +404,27 @@ active(internal_reset_req, LoopDat) -> {next_state, bothway_reset, LoopDat1, ?RESET_TIMER}; active(#primitive{subsystem = 'RCOC', gen_name = 'CONNECTION-MSG', spec_name = indication, + parameters = #sccp_msg{msg_type = ?SCCP_MSGT_IT, + parameters = Params}}, LoopDat) -> + % Section 3.4 Inactivity control + SrcRef = proplists:get_value(src_local_ref, Params), + case LoopDat#state.remote_reference of + SrcRef -> + ClassOpt = proplists:get_value(protocol_class, Params), + case LoopDat#state.class of + ClassOpt -> + % FIXME: class3: discrepancy in seq/segm or credit -> reset + {next_state, active, LoopDat}; + _ -> + % discrepancy in class -> release + disc_ind_stop_rel_3(LoopDat, ?SCCP_CAUSE_REL_INCONS_CONN_DAT) + end; + _ -> + % discrepancy in src ref -> release + disc_ind_stop_rel_3(LoopDat, ?SCCP_CAUSE_REL_INCONS_CONN_DAT) + end; +active(#primitive{subsystem = 'RCOC', gen_name = 'CONNECTION-MSG', + spec_name = indication, parameters = #sccp_msg{msg_type = ?SCCP_MSGT_RSC}}, LoopDat) -> % discard received message {next_state, active, LoopDat}; |