Change in osmo-pcu[master]: gprs_rlcmac_sched: fix incorrect SBA frame number assignment

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

fixeria gerrit-no-reply at lists.osmocom.org
Tue Jan 5 14:22:15 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/21950 )


Change subject: gprs_rlcmac_sched: fix incorrect SBA frame number assignment
......................................................................

gprs_rlcmac_sched: fix incorrect SBA frame number assignment

There is a big difference between:

  if ((a = foo() != 0xffffffff)) { ... }

and

  if ((a = foo()) != 0xffffffff) { ... }

In the first case, 'a' is the result of '!=' operation, i.e. either
0 (false) or 1 (true).  In the second case, 'a' will hold the value
returned by foo(), and this is exactly what must have been used in
gprs_rlcmac_rcv_rts_block().

Change-Id: Ifd607ae8a33382e48f9d9e50a28a4bdf4eaf73a2
Related: CID#215835
---
M src/gprs_rlcmac_sched.cpp
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index caf121f..d7958c4 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -448,7 +448,7 @@
 			block_nr, poll_fn, tbf_name(tbf_cand.poll));
 		usf = USF_UNUSED;
 	/* else. check for sba */
-	} else if ((sba_fn = bts->bts->sba()->sched(trx, ts, fn, block_nr) != 0xffffffff)) {
+	} else if ((sba_fn = bts->bts->sba()->sched(trx, ts, fn, block_nr)) != 0xffffffff) {
 		LOGP(DRLCMACSCHED, LOGL_DEBUG, "Received RTS for PDCH: TRX=%d "
 			"TS=%d FN=%d block_nr=%d scheduling free USF for "
 			"single block allocation at FN=%d\n", trx, ts, fn,

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ifd607ae8a33382e48f9d9e50a28a4bdf4eaf73a2
Gerrit-Change-Number: 21950
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210105/8e0cb178/attachment.htm>


More information about the gerrit-log mailing list