Change in osmo-pcu[master]: assert if tbf pointer for POLL event is NULL

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 Sep 28 19:57:09 UTC 2021


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/25631 )

Change subject: assert if tbf pointer for POLL event is NULL
......................................................................

assert if tbf pointer for POLL event is NULL

The tbf pointer should always point to a valid TBF.

Change-Id: Ib607a38459802f780826f46c20a1696ec98408fb
---
M src/pdch.cpp
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  daniel: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/pdch.cpp b/src/pdch.cpp
index 29e3b20..25e7ff5 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -314,7 +314,7 @@
 	struct pdch_ulc_node *poll;
 
 	poll = pdch_ulc_get_node(ulc, fn);
-	if (!poll || poll->type != PDCH_ULC_NODE_TBF_POLL || !poll->tbf_poll.poll_tbf) {
+	if (!poll || poll->type != PDCH_ULC_NODE_TBF_POLL) {
 		LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "PACKET CONTROL ACK with "
 			"unknown FN=%u TLLI=0x%08x (TRX %d TS %d)\n",
 			fn, tlli, trx_no(), ts_no);
@@ -330,6 +330,7 @@
 				ms_dl_tbf(ms) ? ms_dl_tbf(ms)->state_name() : "None");
 		return;
 	}
+	OSMO_ASSERT(poll->tbf_poll.poll_tbf);
 	tbf = poll->tbf_poll.poll_tbf;
 	reason = poll->tbf_poll.reason;
 
@@ -465,6 +466,7 @@
 			fn, tfi, trx_no(), ts_no);
 		return;
 	}
+	OSMO_ASSERT(poll->tbf_poll.poll_tbf);
 	tbf = as_dl_tbf(poll->tbf_poll.poll_tbf);
 	if (tbf->tfi() != tfi) {
 		LOGPTBFDL(tbf, LOGL_NOTICE,
@@ -533,6 +535,7 @@
 			fn, tfi, trx_no(), ts_no);
 		return;
 	}
+	OSMO_ASSERT(poll->tbf_poll.poll_tbf);
 	tbf = as_dl_tbf(poll->tbf_poll.poll_tbf);
 	if (tbf->tfi() != tfi) {
 		LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "EGPRS PACKET DOWNLINK ACK with "

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ib607a38459802f780826f46c20a1696ec98408fb
Gerrit-Change-Number: 25631
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210928/9fc7f998/attachment.htm>


More information about the gerrit-log mailing list