Change in osmo-pcu[master]: tbf: Assert if update() is called on UL TBF

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 19 11:41:55 UTC 2021


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

Change subject: tbf: Assert if update() is called on UL TBF
......................................................................

tbf: Assert if update() is called on UL TBF

This function is expected to be used only on DL TBF so far, so let's
really assert to avoid going through if something is wrong and ending up
later with other issues.

Change-Id: If398ee48364fce5b5e38830b2b278b3bad9a48a2
---
M src/tbf.cpp
1 file changed, 1 insertion(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  dexter: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/tbf.cpp b/src/tbf.cpp
index 2e2e388..3e190b4 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -314,10 +314,8 @@
 {
 	int rc;
 
-	if (direction != GPRS_RLCMAC_DL_TBF)
-		return -EINVAL;
-
 	LOGP(DTBF, LOGL_DEBUG, "********** DL-TBF update **********\n");
+	OSMO_ASSERT(direction == GPRS_RLCMAC_DL_TBF);
 
 	tbf_unlink_pdch(this);
 	rc = the_pcu->alloc_algorithm(bts, this, false, -1);

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: If398ee48364fce5b5e38830b2b278b3bad9a48a2
Gerrit-Change-Number: 25819
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
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/20211019/56f0a5ce/attachment.htm>


More information about the gerrit-log mailing list