From 7a9456075ca278558106d470d9962d0a73033071 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Mon, 13 Jan 2014 14:47:52 +0100 Subject: HACK: Make ABIS work when reestablishing --- src/common/abis.c | 5 +++-- src/common/oml.c | 5 +++++ src/osmo-bts-trx/l1_if.c | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/common/abis.c b/src/common/abis.c index 65020949..c0565800 100644 --- a/src/common/abis.c +++ b/src/common/abis.c @@ -75,7 +75,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); @@ -84,7 +83,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); @@ -252,6 +250,9 @@ struct e1inp_line *abis_open(struct gsm_bts *bts, const 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 is what currently starts both the outbound OML and RSL * connections, which is wrong. diff --git a/src/common/oml.c b/src/common/oml.c index f0d32de7..dac61433 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -1044,6 +1044,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(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 85be4744..ca0f7cbc 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -287,6 +287,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"); } /* set bts attributes */ -- cgit v1.2.3