Change in osmo-pcu[master]: pdch: has_gprs_only_tb_attached: use m_num_tbfs

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
Wed Sep 8 12:16:00 UTC 2021


pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/25401 )

Change subject: pdch: has_gprs_only_tb_attached: use m_num_tbfs
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/osmo-pcu/+/25401/1/src/pdch.cpp 
File src/pdch.cpp:

https://gerrit.osmocom.org/c/osmo-pcu/+/25401/1/src/pdch.cpp@1111 
PS1, Line 1111: 	return m_num_tbfs[GPRS_RLCMAC_UL_TBF][TBF_TYPE_EGPRS] + m_num_tbfs[GPRS_RLCMAC_DL_TBF][TBF_TYPE_EGPRS] == 0;
That's incorrect. You want to check if there's at least one GPRS TBF, not if there's no EGPRS ones.
Having 0 GPRS and 0 EGPRS you'd return true, which is not the aiming of this function.
Hence, it should be:
return (m_num_tbfs[GPRS_RLCMAC_UL_TBF][TBF_TYPE_GPRS] + m_num_tbfs[GPRS_RLCMAC_DL_TBF][TBF_TYPE_GPRS]) > 0;

better wrap the sum in (), it's unclear at first sight the priority of operations imho.



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I1dd7df2c740ea604f07c65bebcb7c0051aebf9ae
Gerrit-Change-Number: 25401
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Wed, 08 Sep 2021 12:16:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210908/8dd8ebe7/attachment.htm>


More information about the gerrit-log mailing list