pdch: has_gprs_only_tb_attached: use m_num_tbfs

Make use of the separate GPRS counters added in previous patch
I0c0a1121b4ae5f031782e7e63a0c28eb0b6c8b42 to shorten
has_gprs_only_tb_attached.

Related: SYS#4878
Change-Id: I1dd7df2c740ea604f07c65bebcb7c0051aebf9ae
changes/01/25401/11
Oliver Smith 1 year ago committed by pespin
parent eeae776345
commit fce67bc7fa
  1. 14
      src/pdch.cpp

@ -1114,18 +1114,8 @@ void gprs_rlcmac_pdch::detach_tbf(gprs_rlcmac_tbf *tbf)
bool gprs_rlcmac_pdch::has_gprs_only_tbf_attached() const
{
unsigned int i;
unsigned int j;
for (i = 0; i < sizeof(m_assigned_tfi[0]); i++) {
for (j = 0; j < 2; j++) {
if (m_assigned_tfi[j] & (1UL << i)) {
gprs_rlcmac_tbf *tbf = m_tbfs[j][i];
if (!tbf->is_egprs_enabled())
return true;
}
}
}
return false;
return (m_num_tbfs_gprs[GPRS_RLCMAC_UL_TBF] +
m_num_tbfs_gprs[GPRS_RLCMAC_DL_TBF]) > 0;
}
void gprs_rlcmac_pdch::reserve(enum gprs_rlcmac_tbf_direction dir)

Loading…
Cancel
Save