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.orgpespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/24319 )
Change subject: bts: Clean up TS selection in sign_link_up
......................................................................
bts: Clean up TS selection in sign_link_up
Change-Id: I0c92dfd05bf2ae40887980ef10b7e4c679213b6a
---
M src/common/abis.c
M tests/handover/handover_test.c
2 files changed, 22 insertions(+), 18 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/common/abis.c b/src/common/abis.c
index be7e906..55962bd 100644
--- a/src/common/abis.c
+++ b/src/common/abis.c
@@ -99,25 +99,27 @@
static struct e1inp_sign_link *sign_link_up(void *unit, struct e1inp_line *line,
enum e1inp_sign_type type)
{
- struct e1inp_sign_link *sign_link = NULL;
+ struct e1inp_ts *sign_ts;
struct gsm_bts_trx *trx;
int trx_nr;
switch (type) {
case E1INP_SIGN_OML:
+ sign_ts = e1inp_line_ipa_oml_ts(line);
LOGP(DABIS, LOGL_INFO, "OML Signalling link up\n");
- e1inp_ts_config_sign(&line->ts[E1INP_SIGN_OML-1], line);
- sign_link = g_bts->oml_link =
- e1inp_sign_link_create(&line->ts[E1INP_SIGN_OML-1],
- E1INP_SIGN_OML, g_bts->c0, 255, 0);
+ e1inp_ts_config_sign(sign_ts, line);
+ g_bts->oml_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_OML,
+ g_bts->c0, IPAC_PROTO_OML, 0);
if (clock_gettime(CLOCK_MONOTONIC, &g_bts->oml_conn_established_timestamp) != 0)
memset(&g_bts->oml_conn_established_timestamp, 0,
sizeof(g_bts->oml_conn_established_timestamp));
drain_oml_queue(g_bts);
bts_link_estab(g_bts);
- break;
- default:
+ return g_bts->oml_link;
+
+ case E1INP_SIGN_RSL:
trx_nr = type - E1INP_SIGN_RSL;
+ sign_ts = e1inp_line_ipa_rsl_ts(line, trx_nr);
LOGP(DABIS, LOGL_INFO, "RSL Signalling link for TRX%d up\n",
trx_nr);
trx = gsm_bts_trx_num(g_bts, trx_nr);
@@ -126,16 +128,17 @@
trx_nr);
break;
}
- e1inp_ts_config_sign(&line->ts[type-1], line);
- sign_link = trx->rsl_link =
- e1inp_sign_link_create(&line->ts[type-1],
- E1INP_SIGN_RSL, trx,
- trx->rsl_tei, 0);
+ e1inp_ts_config_sign(sign_ts, line);
+ trx->rsl_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_RSL,
+ trx, trx->rsl_tei, 0);
trx_link_estab(trx);
- break;
- }
+ return trx->rsl_link;
- return sign_link;
+ default:
+ LOGP(DABIS, LOGL_ERROR, "Unknwon Signalling link up %d\n", (int)type);
+ return NULL;
+ }
+ return NULL;
}
static void sign_link_down(struct e1inp_line *line)
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 6af8fac..9c9b020 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -58,6 +58,7 @@
{
void *tall_bts_ctx;
struct e1inp_line *line;
+ struct e1inp_ts *sign_ts;
struct gsm_lchan *lchan;
struct osmo_phsap_prim nl1sap;
struct msgb *msg;
@@ -90,9 +91,9 @@
line = e1inp_line_create(0, "ipa");
OSMO_ASSERT(line);
-
- e1inp_ts_config_sign(&line->ts[E1INP_SIGN_RSL-1], line);
- trx->rsl_link = e1inp_sign_link_create(&line->ts[E1INP_SIGN_RSL-1], E1INP_SIGN_RSL, NULL, 0, 0);
+ sign_ts = e1inp_line_ipa_rsl_ts(line, 0);
+ e1inp_ts_config_sign(sign_ts, line);
+ trx->rsl_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_RSL, NULL, 0, 0);
OSMO_ASSERT(trx->rsl_link);
trx->rsl_link->trx = trx;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/24319
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I0c92dfd05bf2ae40887980ef10b7e4c679213b6a
Gerrit-Change-Number: 24319
Gerrit-PatchSet: 4
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-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/20210525/1c0bb767/attachment.htm>