diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-03-17 16:44:16 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-03-17 16:45:37 +0100 |
commit | 5b51fe78b4e70f39555f13ad4c32a0b0454e6df7 (patch) | |
tree | 3366d6089ca3a4a49fc75cc3ffe7e6b617b1489f /src/common/abis.c | |
parent | caeef44699b9e3afbaf6bbbae737d25bd9b716b7 (diff) |
omldummy: Suppress RSL transmission errors
In omldummy, we don't have a RSL link and hence any transmission
attempts to RSL should silently go to /dev/null rather than printing
error messages via libosmo-abis. So check for the OMLDUMMY variant and
silently discard any RSL message that the code may want to transmit.
Change-Id: I04a9ec7e416822cc1e45c533e6a66628689615ad
Diffstat (limited to 'src/common/abis.c')
-rw-r--r-- | src/common/abis.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/abis.c b/src/common/abis.c index 6402bdb2..6aa2f1d1 100644 --- a/src/common/abis.c +++ b/src/common/abis.c @@ -81,6 +81,13 @@ static void drain_oml_queue(struct gsm_bts *bts) int abis_bts_rsl_sendmsg(struct msgb *msg) { + OSMO_ASSERT(msg->trx); + + if (msg->trx->bts->variant == BTS_OSMO_OMLDUMMY) { + msgb_free(msg); + return 0; + } + /* osmo-bts uses msg->trx internally, but libosmo-abis uses * the signalling link at msg->dst */ msg->dst = msg->trx->rsl_link; |