Review at  https://gerrit.osmocom.org/5547

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(-)


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

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: newchange
Gerrit-Change-Id: Ie6ae564d41a5e03270685c6bafb3504278eb3551
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max <[email protected]>

Reply via email to