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
Mon Oct 18 14:14:11 UTC 2021


pespin has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/19/25819/1

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-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211018/dd4c7a4e/attachment.htm>


More information about the gerrit-log mailing list