[PATCH] osmo-bts[master]: omldummy: Suppress RSL transmission errors

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sat Mar 17 15:45:46 UTC 2018


Review at  https://gerrit.osmocom.org/7346

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
---
M src/common/abis.c
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/7346/1

diff --git a/src/common/abis.c b/src/common/abis.c
index 6402bdb..6aa2f1d 100644
--- a/src/common/abis.c
+++ b/src/common/abis.c
@@ -81,6 +81,13 @@
 
 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;

-- 
To view, visit https://gerrit.osmocom.org/7346
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I04a9ec7e416822cc1e45c533e6a66628689615ad
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list