fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bts/+/42046?usp=email )
Change subject: osmo-bts-trx: trx_provision_fsm: do not send *_CNF events on
failure
......................................................................
osmo-bts-trx: trx_provision_fsm: do not send *_CNF events on failure
The trx_provision_fsm currently does not check the event data (rc),
causing failed operations (rc != 0) to be treated as successful
confirmations. Avoid emitting *_CNF events when a command fails,
ensuring that only successful operations generate confirmation events.
Change-Id: Id85fb19c6621f55a9c46882df24bec534864a9dc
---
M src/osmo-bts-trx/trx_provision_fsm.c
1 file changed, 12 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/42046/1
diff --git a/src/osmo-bts-trx/trx_provision_fsm.c
b/src/osmo-bts-trx/trx_provision_fsm.c
index 05f3cdb..2b8a2d2 100644
--- a/src/osmo-bts-trx/trx_provision_fsm.c
+++ b/src/osmo-bts-trx/trx_provision_fsm.c
@@ -63,22 +63,30 @@
static void l1if_rxtune_cb(struct trx_l1h *l1h, int rc)
{
- osmo_fsm_inst_dispatch(l1h->provision_fi, TRX_PROV_EV_RXTUNE_CNF,
(void*)(intptr_t)rc);
+ if (rc != 0)
+ return;
+ osmo_fsm_inst_dispatch(l1h->provision_fi, TRX_PROV_EV_RXTUNE_CNF, NULL);
}
static void l1if_txtune_cb(struct trx_l1h *l1h, int rc)
{
- osmo_fsm_inst_dispatch(l1h->provision_fi, TRX_PROV_EV_TXTUNE_CNF,
(void*)(intptr_t)rc);
+ if (rc != 0)
+ return;
+ osmo_fsm_inst_dispatch(l1h->provision_fi, TRX_PROV_EV_TXTUNE_CNF, NULL);
}
static void l1if_settsc_cb(struct trx_l1h *l1h, int rc)
{
- osmo_fsm_inst_dispatch(l1h->provision_fi, TRX_PROV_EV_SETTSC_CNF,
(void*)(intptr_t)rc);
+ if (rc != 0)
+ return;
+ osmo_fsm_inst_dispatch(l1h->provision_fi, TRX_PROV_EV_SETTSC_CNF, NULL);
}
static void l1if_setbsic_cb(struct trx_l1h *l1h, int rc)
{
- osmo_fsm_inst_dispatch(l1h->provision_fi, TRX_PROV_EV_SETBSIC_CNF,
(void*)(intptr_t)rc);
+ if (rc != 0)
+ return;
+ osmo_fsm_inst_dispatch(l1h->provision_fi, TRX_PROV_EV_SETBSIC_CNF,
NULL);
}
static void l1if_getnompower_cb(struct trx_l1h *l1h, int nominal_power, int rc)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42046?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Id85fb19c6621f55a9c46882df24bec534864a9dc
Gerrit-Change-Number: 42046
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>