Change in osmo-bts[master]: bts-virt: Don't rely on gsmtap_makemsg() returning NULL for GSMTAP_CH...

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/.

pespin gerrit-no-reply at lists.osmocom.org
Mon Jul 6 12:46:14 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/19161 )


Change subject: bts-virt: Don't rely on gsmtap_makemsg() returning NULL for GSMTAP_CHANNEL_UNKNOWN
......................................................................

bts-virt: Don't rely on gsmtap_makemsg() returning NULL for GSMTAP_CHANNEL_UNKNOWN

commit d211c490cad38f2009943121d57bdb7df8eee9b0 avoided sending
GSMTAP packets on the virtual Um interface with type
GSMTAP_CHANNEL_UNKNOWN by relying on gsmtap_makemsg returning NULL.
But that's not the corect approach since it's totally fine to be sending
GSMTAP_CHANNEL_UNKNOWN on some GSMTAP cases (for instance when the
program fails to infer the type when decoding a message), since then
this way one can study pcap files and find the offending encoded
messages which failed to be decoded.

This patch goes togehter with revert patch introduced in libosmocore as
explained in the commit referred above.

Change-Id: I233afd930d3e43f7b120d40192c7c192102e38d9
---
M src/osmo-bts-virtual/scheduler_virtbts.c
1 file changed, 4 insertions(+), 1 deletion(-)



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

diff --git a/src/osmo-bts-virtual/scheduler_virtbts.c b/src/osmo-bts-virtual/scheduler_virtbts.c
index 1c2b057..466e864 100644
--- a/src/osmo-bts-virtual/scheduler_virtbts.c
+++ b/src/osmo-bts-virtual/scheduler_virtbts.c
@@ -78,9 +78,12 @@
 	else
 		gsmtap_chantype = chantype_rsl2gsmtap2(rsl_chantype, chdesc->link_id, is_voice_frame); /* the logical channel type */
 
-	if (gsmtap_chantype == GSMTAP_CHANNEL_UNKNOWN)
+	if (gsmtap_chantype == GSMTAP_CHANNEL_UNKNOWN) {
 		LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Tx GSMTAP for RSL channel type 0x%02x: cannot send, this"
 		       " channel type is unknown in GSMTAP\n", rsl_chantype);
+		msgb_free(msg);
+		return;
+	}
 
 #if MODULO_HYPERFRAME
 	/* Restart fn after every superframe (26 * 51 frames) to simulate hyperframe overflow each 6 seconds. */

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/19161
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I233afd930d3e43f7b120d40192c7c192102e38d9
Gerrit-Change-Number: 19161
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200706/c356ee52/attachment.htm>


More information about the gerrit-log mailing list