diff options
author | Max <msuraev@sysmocom.de> | 2017-12-21 18:58:50 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-01-02 07:26:05 +0000 |
commit | 0bc982e7142426c1739eae5cd636ff5bd3c8d872 (patch) | |
tree | d5ca54f1e4e6391254f8268d2dc34103940c468a /src | |
parent | 467f633b165ed2d439bb54d4ae42cdc341ea81b3 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/tbf.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp index 520f6c45..aec67e7e 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -543,6 +543,7 @@ void gprs_rlcmac_tbf::t_stop(enum tbf_timers t, const char *reason) 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 @@ void gprs_rlcmac_tbf::t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec 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])) |