aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/bts_shutdown_fsm.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-06-18 19:36:12 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-06-23 14:53:37 +0200
commit8090df2a813a3cf174afb8acb9aba92b65d275fb (patch)
treecee14c7b8e18b81ea7542c0133c7bd6aa2ee1631 /src/common/bts_shutdown_fsm.c
parentceb80fc6b6edcc701a423d6bfe8601b08ff3a10d (diff)
bts_model: Convert bts_model_trx_close() to return asynchronously
Some backends like osmo-bts-trx require exchanging messages like POWEROFF to close the TRX, and hence need some time. Switch the function to expect result asynchronously by calling a callback. This will be used later to wait until all TRX are really powered off before exiting the process. Change-Id: I7d76b600fc06e1114b35bf0c2d08eff5bbd1b69a
Diffstat (limited to 'src/common/bts_shutdown_fsm.c')
-rw-r--r--src/common/bts_shutdown_fsm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/bts_shutdown_fsm.c b/src/common/bts_shutdown_fsm.c
index e65fff42..81cd3489 100644
--- a/src/common/bts_shutdown_fsm.c
+++ b/src/common/bts_shutdown_fsm.c
@@ -170,3 +170,9 @@ void bts_shutdown(struct gsm_bts *bts, const char *reason)
LOGPFSML(fi, LOGL_NOTICE, "Shutting down BTS, reason: %s\n", reason);
osmo_fsm_inst_dispatch(fi, BTS_SHUTDOWN_EV_START, NULL);
}
+
+void bts_model_trx_close_cb(struct gsm_bts_trx *trx, int rc)
+{
+ struct osmo_fsm_inst *fi = trx->bts->shutdown_fi;
+ LOGPFSML(fi, LOGL_DEBUG, "%s Received TRX close cb rc=%d\n", gsm_trx_name(trx), rc);
+}