aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2014-01-13 14:47:52 +0100
committerAlexander Chemeris <Alexander.Chemeris@gmail.com>2015-09-12 10:03:11 -0400
commitddfc1f3b4ca46b8228b3dfb94e1de2460dd2a7cc (patch)
tree9551c7e9954f6ef330529ab201760aa2b78515fd
parentABIS: Support for multiple RSL connections (diff)
downloadOsmoBTS-ddfc1f3b4ca46b8228b3dfb94e1de2460dd2a7cc.tar.xz
OsmoBTS-ddfc1f3b4ca46b8228b3dfb94e1de2460dd2a7cc.zip
HACK: Make ABIS work when reestablishing
-rw-r--r--src/common/abis.c5
-rw-r--r--src/common/oml.c5
-rw-r--r--src/osmo-bts-trx/l1_if.c3
3 files changed, 11 insertions, 2 deletions
diff --git a/src/common/abis.c b/src/common/abis.c
index 3b8a7af1..1412e0de 100644
--- a/src/common/abis.c
+++ b/src/common/abis.c
@@ -77,7 +77,6 @@ static struct e1inp_sign_link *sign_link_up(void *unit, struct e1inp_line *line,
switch (type) {
case E1INP_SIGN_OML:
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, NULL, 255, 0);
@@ -86,7 +85,6 @@ static struct e1inp_sign_link *sign_link_up(void *unit, struct e1inp_line *line,
break;
case E1INP_SIGN_RSL:
LOGP(DABIS, LOGL_INFO, "RSL Signalling link up\n");
- e1inp_ts_config_sign(&line->ts[E1INP_SIGN_RSL-1], line);
sign_link = g_bts->c0->rsl_link =
e1inp_sign_link_create(&line->ts[E1INP_SIGN_RSL-1],
E1INP_SIGN_RSL, NULL, 0, 0);
@@ -230,6 +228,9 @@ struct e1inp_line *abis_open(struct gsm_bts *bts, char *dst_host,
if (!line)
return NULL;
e1inp_line_bind_ops(line, &line_ops);
+ e1inp_ts_config_sign(&line->ts[E1INP_SIGN_OML-1], line);
+ for (i = 0; i < num_trx; i++)
+ e1inp_ts_config_sign(&line->ts[E1INP_SIGN_RSL-1+i], line);
/* This will open the OML connection now */
if (e1inp_line_update(line) < 0)
diff --git a/src/common/oml.c b/src/common/oml.c
index 3e6c8b84..6de9055b 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -1058,6 +1058,11 @@ static int rx_oml_ipa_rsl_connect(struct gsm_bts_trx *trx, struct msgb *msg,
LOGP(DOML, LOGL_INFO, "Rx IPA RSL CONNECT IP=%s PORT=%u STREAM=0x%02x\n",
inet_ntoa(in), port, stream_id);
+ if (trx->rsl_link) {
+ LOGP(DOML, LOGL_INFO, "Sign Link already up\n");
+ return oml_fom_ack_nack(msg, 0);
+ }
+
rc = e1inp_ipa_bts_rsl_connect_n(oml_link->ts->line, inet_ntoa(in), port,
trx->nr);
if (rc < 0) {
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index 42cb17b8..ce120d33 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -294,6 +294,9 @@ void bts_model_abis_close(struct gsm_bts *bts)
llist_for_each_entry(trx, &bts->trx_list, list)
bts_model_trx_close(trx);
+
+ /* for now, we simply terminate the program and re-spawn */
+ bts_shutdown(bts, "Abis close");
}
int bts_model_adjst_ms_pwr(struct gsm_lchan *lchan)