[MERGED] osmo-pcu[master]: TBF: bail out for unknown timers

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Jan 2 07:26:06 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: TBF: bail out for unknown timers
......................................................................


TBF: bail out for unknown timers

Return right after logging error if attempting to start or stop unknown
timer.

Change-Id: Ie6ae564d41a5e03270685c6bafb3504278eb3551
Fixes: CID181512, CID181514
---
M src/tbf.cpp
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/tbf.cpp b/src/tbf.cpp
index 520f6c4..aec67e7 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -543,6 +543,7 @@
 	if (t >= T_MAX) {
 		LOGPTBF(this, LOGL_ERROR, "attempting to stop unknown timer %s [%s]\n",
 			get_value_string(tbf_timers_names, t), reason);
+		return;
 	}
 
 	if (osmo_timer_pending(&T[t])) {
@@ -600,6 +601,7 @@
 	if (t >= T_MAX) {
 		LOGPSRC(DRLCMAC, LOGL_ERROR, file, line, "%s attempting to start unknown timer %s [%s]\n",
 			tbf_name(this), get_value_string(tbf_timers_names, t), reason);
+		return;
 	}
 
 	if (!force && osmo_timer_pending(&T[t]))

-- 
To view, visit https://gerrit.osmocom.org/5547
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie6ae564d41a5e03270685c6bafb3504278eb3551
Gerrit-PatchSet: 2
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list