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
This commit is contained in:
Harald Welte 2018-03-17 16:44:16 +01:00
parent caeef44699
commit 5b51fe78b4
1 changed files with 7 additions and 0 deletions

View File

@ -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;