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/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/19965 )
Change subject: abis_om2000: check result of gsm_bts_trx_set_system_infos()
......................................................................
abis_om2000: check result of gsm_bts_trx_set_system_infos()
Ensure that osmo-bsc would not continue to work as usual, if for
some reason we cannot encode or send System Information messages.
Introduce transitional state OM2K_TRX_S_SEND_SI, from where we
can generate and send System Information messages. Otherwise
it's confusing if we fail to do something when we're already
in state OM2K_TRX_S_DONE.
Change-Id: Ia6df539d0914c57ea80fdb29882832678b47f267
---
M src/osmo-bsc/abis_om2000.c
1 file changed, 19 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/65/19965/1
diff --git a/src/osmo-bsc/abis_om2000.c b/src/osmo-bsc/abis_om2000.c
index 5c8b378..802cdb8 100644
--- a/src/osmo-bsc/abis_om2000.c
+++ b/src/osmo-bsc/abis_om2000.c
@@ -2122,6 +2122,7 @@
OM2K_TRX_S_WAIT_TX,
OM2K_TRX_S_WAIT_RX,
OM2K_TRX_S_WAIT_TS,
+ OM2K_TRX_S_SEND_SI,
OM2K_TRX_S_DONE,
OM2K_TRX_S_ERROR
};
@@ -2195,14 +2196,22 @@
&ts->rbs2000.om2k_mo);
} else {
/* only after all 8 TS */
- osmo_fsm_inst_state_chg(fi, OM2K_TRX_S_DONE, 0, 0);
+ osmo_fsm_inst_state_chg(fi, OM2K_TRX_S_SEND_SI, 0, 0);
}
}
+static void om2k_trx_s_send_si(struct osmo_fsm_inst *fi, uint32_t prev_state)
+{
+ struct om2k_trx_fsm_priv *otfp = fi->priv;
+
+ if (gsm_bts_trx_set_system_infos(otfp->trx) == 0)
+ osmo_fsm_inst_state_chg(fi, OM2K_TRX_S_DONE, 0, 0);
+ else
+ osmo_fsm_inst_state_chg(fi, OM2K_TRX_S_ERROR, 0, 0);
+}
+
static void om2k_trx_s_done_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
{
- struct om2k_trx_fsm_priv *otfp = fi->priv;
- gsm_bts_trx_set_system_infos(otfp->trx);
osmo_fsm_inst_term(fi, OSMO_FSM_TERM_REGULAR, NULL);
}
@@ -2237,10 +2246,16 @@
[OM2K_TRX_S_WAIT_TS] = {
.in_event_mask = S(OM2K_TRX_EVT_TS_DONE),
.out_state_mask = S(OM2K_TRX_S_ERROR) |
- S(OM2K_TRX_S_DONE),
+ S(OM2K_TRX_S_SEND_SI),
.name = "WAIT-TS",
.action = om2k_trx_s_wait_ts,
},
+ [OM2K_TRX_S_SEND_SI] = {
+ .out_state_mask = S(OM2K_TRX_S_ERROR) |
+ S(OM2K_TRX_S_DONE),
+ .name = "SEND-SI",
+ .action = om2k_trx_s_send_si,
+ },
[OM2K_TRX_S_DONE] = {
.name = "DONE",
.onenter = om2k_trx_s_done_onenter,
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/19965
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ia6df539d0914c57ea80fdb29882832678b47f267
Gerrit-Change-Number: 19965
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200903/f1e0039d/attachment.htm>