aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/abis.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-09-16 18:35:02 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-09-20 16:25:47 +0200
commit5a2d8716ef412f11bdd61c353894e0725836c3ff (patch)
treeb424c1479e88ed885e3ad59eea42b6548d6e0326 /src/common/abis.c
parent92186c672d762ae38fc0041e1b6638c1cbe282f5 (diff)
abis: Drop internal OML msg queue
There's no real use for this queue. If the link is gone, it makes no sense to keep old messages. Instead, BTS should generate new messages sharing current state when link becomes established (it actually does so already). Change-Id: Iecd3c7cb96f5fff3b4c7e04c74e031df0f7a6987
Diffstat (limited to 'src/common/abis.c')
-rw-r--r--src/common/abis.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/src/common/abis.c b/src/common/abis.c
index 31a3505b..8e713d27 100644
--- a/src/common/abis.c
+++ b/src/common/abis.c
@@ -104,19 +104,6 @@ static void reset_oml_link(struct gsm_bts *bts)
memset(&bts->oml_conn_established_timestamp, 0, sizeof(bts->oml_conn_established_timestamp));
}
-static void drain_oml_queue(struct gsm_bts *bts)
-{
- struct msgb *msg, *msg2;
-
- llist_for_each_entry_safe(msg, msg2, &bts->oml_queue, list) {
- /* osmo-bts uses msg->trx internally, but libosmo-abis uses
- * the signalling link at msg->dst */
- llist_del(&msg->list);
- msg->dst = bts->oml_link;
- abis_sendmsg(msg);
- }
-}
-
static int pick_next_bsc(struct osmo_fsm_inst *fi)
{
struct abis_link_fsm_priv *priv = fi->priv;
@@ -208,7 +195,6 @@ static void abis_link_connecting(struct osmo_fsm_inst *fi, uint32_t event, void
static void abis_link_connected_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
{
- drain_oml_queue(g_bts);
bts_link_estab(g_bts);
}
@@ -324,14 +310,14 @@ int abis_oml_sendmsg(struct msgb *msg)
struct gsm_bts *bts = msg->trx->bts;
if (!bts->oml_link) {
- llist_add_tail(&msg->list, &bts->oml_queue);
+ LOGP(DABIS, LOGL_INFO, "Drop Tx OML msg, OML link is down\n");
return 0;
- } else {
- /* osmo-bts uses msg->trx internally, but libosmo-abis uses
- * the signalling link at msg->dst */
- msg->dst = bts->oml_link;
- return abis_sendmsg(msg);
}
+
+ /* osmo-bts uses msg->trx internally, but libosmo-abis uses
+ * the signalling link at msg->dst */
+ msg->dst = bts->oml_link;
+ return abis_sendmsg(msg);
}
int abis_bts_rsl_sendmsg(struct msgb *msg)