This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/25626 ) Change subject: nacc: Introduce helper function nacc_fsm_exp_ctrl_ack() ...................................................................... nacc: Introduce helper function nacc_fsm_exp_ctrl_ack() Move FSM internal state checks to its own file. Re-use the helper function in the 2 places where same stuff is checked. Change-Id: I9ded6e1c80e6cd7bcf6883bc2e853b6dafb33f7c --- M src/nacc_fsm.c M src/nacc_fsm.h M src/pdch.cpp M src/tbf.cpp 4 files changed, 12 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified daniel: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/nacc_fsm.c b/src/nacc_fsm.c index df38927..ba7bbb7 100644 --- a/src/nacc_fsm.c +++ b/src/nacc_fsm.c @@ -895,3 +895,10 @@ return false; return !osmo_cgi_ps_cmp(&ctx->cgi_ps, cgi_ps); } + +bool nacc_fsm_exp_ctrl_ack(const struct nacc_fsm_ctx *ctx, uint32_t fn, uint8_t ts) +{ + return ctx->fi->state == NACC_ST_WAIT_CELL_CHG_CONTINUE_ACK && + ctx->continue_poll_fn == fn && + ctx->continue_poll_ts == ts; +} diff --git a/src/nacc_fsm.h b/src/nacc_fsm.h index 68ebd52..beea0f7 100644 --- a/src/nacc_fsm.h +++ b/src/nacc_fsm.h @@ -75,3 +75,5 @@ bool nacc_fsm_is_waiting_si_resolution(const struct nacc_fsm_ctx *ctx, const struct osmo_cell_global_id_ps *cgi_ps); + +bool nacc_fsm_exp_ctrl_ack(const struct nacc_fsm_ctx *ctx, uint32_t fn, uint8_t ts); diff --git a/src/pdch.cpp b/src/pdch.cpp index 19d57a2..76acbca 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -401,8 +401,7 @@ return; } - if (ms->nacc && ms->nacc->fi->state == NACC_ST_WAIT_CELL_CHG_CONTINUE_ACK && - ms->nacc->continue_poll_fn == fn && ms->nacc->continue_poll_ts == ts_no) { + if (ms->nacc && nacc_fsm_exp_ctrl_ack(ms->nacc, fn, ts_no)) { osmo_fsm_inst_dispatch(ms->nacc->fi, NACC_EV_RX_CELL_CHG_CONTINUE_ACK, NULL); /* Don't assume MS is no longer reachable (hence don't free) after this: TS 44.060 * "When the mobile station receives the PACKET CELL CHANGE ORDER diff --git a/src/tbf.cpp b/src/tbf.cpp index 61ab90e..0ea013b 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -570,8 +570,8 @@ } /* Signal timeout to FSM to reschedule DL assignment */ osmo_fsm_inst_dispatch(this->dl_ass_fsm.fi, TBF_DL_ASS_EV_ASS_POLL_TIMEOUT, NULL); - } else if (reason == PDCH_ULC_POLL_CELL_CHG_CONTINUE && m_ms->nacc && m_ms->nacc->fi->state == NACC_ST_WAIT_CELL_CHG_CONTINUE_ACK && - m_ms->nacc->continue_poll_fn == poll_fn && m_ms->nacc->continue_poll_ts == pdch->ts_no) { + } else if (reason == PDCH_ULC_POLL_CELL_CHG_CONTINUE && + m_ms->nacc && nacc_fsm_exp_ctrl_ack(m_ms->nacc, poll_fn, pdch->ts_no)) { /* Timeout waiting for CTRL ACK acking Pkt Cell Change Continue */ osmo_fsm_inst_dispatch(m_ms->nacc->fi, NACC_EV_TIMEOUT_CELL_CHG_CONTINUE, NULL); return; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/25626 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I9ded6e1c80e6cd7bcf6883bc2e853b6dafb33f7c Gerrit-Change-Number: 25626 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210928/3a066fb0/attachment.htm>