Change in osmo-bts[master]: nm_channel_fsm: Release lchans after BTS shutdown

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/.

pespin gerrit-no-reply at lists.osmocom.org
Wed Oct 6 18:05:27 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/25701 )


Change subject: nm_channel_fsm: Release lchans after BTS shutdown
......................................................................

nm_channel_fsm: Release lchans after BTS shutdown

This fixes some TTCN3 tests where some lchan resources were kept from
previous tests.

Change-Id: I78dca32cd061fba86cc88c4c4f323b33d51c58d0
---
M include/osmo-bts/gsm_data.h
M src/common/gsm_data.c
M src/common/nm_channel_fsm.c
3 files changed, 13 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/01/25701/1

diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index c2f8984..a7ecbde 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -199,4 +199,6 @@
 
 bool ts_is_pdch(const struct gsm_bts_trx_ts *ts);
 
+void gsm_ts_release(struct gsm_bts_trx_ts *ts);
+
 #endif /* _GSM_DATA_H */
diff --git a/src/common/gsm_data.c b/src/common/gsm_data.c
index 2edeb4d..4446958 100644
--- a/src/common/gsm_data.c
+++ b/src/common/gsm_data.c
@@ -305,3 +305,13 @@
 		return false;
 	}
 }
+
+void gsm_ts_release(struct gsm_bts_trx_ts *ts)
+{
+	unsigned int ln;
+
+	for (ln = 0; ln < ARRAY_SIZE(ts->lchan); ln++) {
+		struct gsm_lchan *lchan = &ts->lchan[ln];
+		gsm_lchan_release(lchan, LCHAN_REL_ACT_OML);
+	}
+}
diff --git a/src/common/nm_channel_fsm.c b/src/common/nm_channel_fsm.c
index f933a16..1f47a3e 100644
--- a/src/common/nm_channel_fsm.c
+++ b/src/common/nm_channel_fsm.c
@@ -193,6 +193,7 @@
 		oml_mo_state_chg(&ts->mo, -1, -1, NM_STATE_SHUTDOWN);
 		break;
 	case NM_EV_SHUTDOWN_FINISH:
+		gsm_ts_release(ts);
 		nm_chan_fsm_state_chg(fi, NM_CHAN_ST_OP_DISABLED_NOTINSTALLED);
 		break;
 	default:

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/25701
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I78dca32cd061fba86cc88c4c4f323b33d51c58d0
Gerrit-Change-Number: 25701
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211006/af666ce1/attachment.htm>


More information about the gerrit-log mailing list