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 <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder

Reply via email to