Change in osmo-bts[master]: scheduler: Fix check against empty PDCH blocks

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
Tue Oct 26 14:43:22 UTC 2021


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/25944 )

Change subject: scheduler: Fix check against empty PDCH blocks
......................................................................

scheduler: Fix check against empty PDCH blocks

msgb_l2len() will return nonzero values if msg->l2h is NULL.
Let's check against msg->l2h being NULL instead.

Related: SYS#5676
Related: SYS#4919
Fixes: 300e31ed135c674cd44526b7503d4664a45a9ec3
Change-Id: I18b61fcaa858a53887191a18d560c2e929478c64
---
M src/common/scheduler.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  osmith: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index a53de09..c068ea0 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -869,7 +869,7 @@
 	OSMO_ASSERT(l1sap->oph.msg);
 
 	/* ignore empty frame */
-	if (!msgb_l2len(l1sap->oph.msg)) {
+	if (!l1sap->oph.msg->l2h) {
 		msgb_free(l1sap->oph.msg);
 		return 0;
 	}

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I18b61fcaa858a53887191a18d560c2e929478c64
Gerrit-Change-Number: 25944
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211026/0f8fd6a1/attachment.htm>


More information about the gerrit-log mailing list