Change in osmo-bts[master]: pcu_sock: Avoid presenting TS from disabled TRX as available to PCU

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 Jul 8 11:36:06 UTC 2020


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/19116 )

Change subject: pcu_sock: Avoid presenting TS from disabled TRX as available to PCU
......................................................................

pcu_sock: Avoid presenting TS from disabled TRX as available to PCU

Change-Id: I4b24faf3a8fe5846b9394fea8faf9d37cc0ac9ff
---
M src/common/pcu_sock.c
1 file changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Hoernchen: Looks good to me, but someone else must approve
  fixeria: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved



diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index f4a8c0a..5fa0e19 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -35,6 +35,7 @@
 #include <osmocom/core/select.h>
 #include <osmocom/core/socket.h>
 #include <osmocom/gsm/gsm23003.h>
+#include <osmocom/gsm/abis_nm.h>
 #include <osmo-bts/logging.h>
 #include <osmo-bts/gsm_data.h>
 #include <osmo-bts/pcu_if.h>
@@ -219,6 +220,13 @@
 		info_ind->trx[i].pdch_mask = 0;
 		info_ind->trx[i].arfcn = trx->arfcn;
 		info_ind->trx[i].hlayer1 = trx_get_hlayer1(trx);
+		if (trx->mo.nm_state.operational != NM_OPSTATE_ENABLED ||
+		    trx->mo.nm_state.administrative != NM_STATE_UNLOCKED) {
+			    LOGPTRX(trx, DPCU, LOGL_INFO, "unavailable for PCU (op=%s adm=%s)\n",
+				    abis_nm_opstate_name(trx->mo.nm_state.operational),
+				    abis_nm_admin_name(trx->mo.nm_state.administrative));
+			continue;
+		}
 		for (j = 0; j < 8; j++) {
 			ts = &trx->ts[j];
 			if (ts->mo.nm_state.operational == NM_OPSTATE_ENABLED

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I4b24faf3a8fe5846b9394fea8faf9d37cc0ac9ff
Gerrit-Change-Number: 19116
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200708/872ae78e/attachment.htm>


More information about the gerrit-log mailing list