Change in osmo-pcu[master]: tbf: Avoid crash: don't set TBF window size if setup failed

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
Fri May 8 11:55:32 UTC 2020


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


Change subject: tbf: Avoid crash: don't set TBF window size if setup failed
......................................................................

tbf: Avoid crash: don't set TBF window size if setup failed

Should fix assertion triggered due to the tbf not set up properly
beforehand.

Fixes: OS#4524
Change-Id: I267b147520ef5a50f40ad4bc19e7b5fb3e708127
---
M src/tbf.cpp
1 file changed, 3 insertions(+), 3 deletions(-)



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

diff --git a/src/tbf.cpp b/src/tbf.cpp
index 73d7ea9..fb985d4 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -1014,15 +1014,15 @@
 
 	rc = setup_tbf(tbf, ms, use_trx, ms_class, egprs_ms_class, single_slot);
 
-	if (tbf->is_egprs_enabled())
-		tbf->set_window_size();
-
 	/* if no resource */
 	if (rc < 0) {
 		talloc_free(tbf);
 		return NULL;
 	}
 
+	if (tbf->is_egprs_enabled())
+		tbf->set_window_size();
+
 	tbf->m_ul_egprs_ctrs = rate_ctr_group_alloc(tbf,
 					&tbf_ul_egprs_ctrg_desc, tbf->m_ctrs->idx);
 	tbf->m_ul_gprs_ctrs = rate_ctr_group_alloc(tbf,

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I267b147520ef5a50f40ad4bc19e7b5fb3e708127
Gerrit-Change-Number: 18115
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/20200508/4e445049/attachment.htm>


More information about the gerrit-log mailing list