Change in osmo-bsc[master]: bsc: Clean up TS selection in ipaccess_sign_link_up/down

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

laforge gerrit-no-reply at lists.osmocom.org
Sun May 23 10:30:44 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24268 )

Change subject: bsc: Clean up TS selection in ipaccess_sign_link_up/down
......................................................................

bsc: Clean up TS selection in ipaccess_sign_link_up/down

Change-Id: I3e60ebc979010830a5c40112824893a640c58fd4
---
M src/osmo-bsc/bts_ipaccess_nanobts.c
1 file changed, 5 insertions(+), 4 deletions(-)

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



diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c
index 16fa201..7fb7948 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -678,10 +678,11 @@
 	struct e1inp_sign_link *sign_link = NULL;
 	struct timespec tp;
 	int rc;
+	struct e1inp_ts *sign_ts = e1inp_line_ipa_oml_ts(line);
 
 	bts = find_bts_by_unitid(bsc_gsmnet, dev->site_id, dev->bts_id);
 	if (!bts) {
-		ipaccess_sign_link_reject(dev, &line->ts[E1INP_SIGN_OML - 1]);
+		ipaccess_sign_link_reject(dev, sign_ts);
 		return NULL;
 	}
 	DEBUGP(DLINP, "%s: Identified BTS %u/%u/%u\n", e1inp_signtype_name(type),
@@ -701,7 +702,7 @@
 
 		/* create new OML link. */
 		sign_link = bts->oml_link =
-			e1inp_sign_link_create(&line->ts[E1INP_SIGN_OML - 1],
+			e1inp_sign_link_create(sign_ts,
 						E1INP_SIGN_OML, bts->c0,
 						bts->oml_tei, 0);
 		rc = clock_gettime(CLOCK_MONOTONIC, &tp);
@@ -726,7 +727,7 @@
 
 		/* set new RSL link for this TRX. */
 		line = bts->oml_link->ts->line;
-		ts = &line->ts[E1INP_SIGN_RSL + dev->trx_id - 1];
+		ts = e1inp_line_ipa_rsl_ts(line, dev->trx_id);
 		e1inp_ts_config_sign(ts, line);
 		sign_link = trx->rsl_link =
 				e1inp_sign_link_create(ts, E1INP_SIGN_RSL,
@@ -751,7 +752,7 @@
 static void ipaccess_sign_link_down(struct e1inp_line *line)
 {
 	/* No matter what link went down, we close both signal links. */
-	struct e1inp_ts *ts = &line->ts[E1INP_SIGN_OML-1];
+	struct e1inp_ts *ts = e1inp_line_ipa_oml_ts(line);
 	struct gsm_bts *bts = NULL;
 	struct e1inp_sign_link *link;
 

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I3e60ebc979010830a5c40112824893a640c58fd4
Gerrit-Change-Number: 24268
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210523/368588bb/attachment.htm>


More information about the gerrit-log mailing list