Change in osmo-pcu[master]: ul_tbf: Fix accessing zeroed block when checking if transfer is complete

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 May 11 16:07:47 UTC 2021


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


Change subject: ul_tbf: Fix accessing zeroed block when checking if transfer is complete
......................................................................

ul_tbf: Fix accessing zeroed block when checking if transfer is complete

The logic checking whether the UL TBF had already been sent all the data
(and hence was marked as finished and requesting UL ACK to be sent) was
not taking into account the case where there was still no valid block
stored, ie. when the first received UL data block was discarded for some
reason (ex: because TLLI was not set during content resolution).

Related: OS#1940
Change-Id: I739e67ae1bb40555a362170f26fb98ac69caabb2
---
M src/tbf_ul.cpp
1 file changed, 3 insertions(+), 2 deletions(-)



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

diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index e92a920..231ed06 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -528,7 +528,8 @@
 
 	/* Check if we already received all data TBF had to send: */
 	if (this->state_is(GPRS_RLCMAC_FLOW) /* still in flow state */
-	 && this->m_window.v_q() == this->m_window.v_r()) { /* if complete */
+	 && this->m_window.v_q() == this->m_window.v_r() /* if complete */
+	 && block->len) { /* if there was ever a last block received */
 		LOGPTBFUL(this, LOGL_DEBUG,
 			  "No gaps in received block, last block: BSN=%d CV=%d\n",
 			  rdbi->bsn, rdbi->cv);
@@ -542,7 +543,7 @@
 
 	/* If TLLI is included or if we received half of the window, we send
 	 * an ack/nack */
-	maybe_schedule_uplink_acknack(rlc, rdbi->cv == 0);
+	maybe_schedule_uplink_acknack(rlc, block->len && rdbi->cv == 0);
 
 	return 0;
 }

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I739e67ae1bb40555a362170f26fb98ac69caabb2
Gerrit-Change-Number: 24211
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/20210511/fb7b93ab/attachment.htm>


More information about the gerrit-log mailing list