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

tbf: add frame number to log output

Currently, the TBF timer log messages lack the frame number in
the logoutput

- Add frame number to TBF timer related log-statements

Change-Id: I5a744dc5cd7c1de1baea13fffac026c83d091429
Related: SYS#4139
Patch-by: Octasic inc.
---
M src/tbf.cpp
1 file changed, 11 insertions(+), 7 deletions(-)


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

diff --git a/src/tbf.cpp b/src/tbf.cpp
index 7036ea1..d5fbb3f 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -661,18 +661,20 @@
 void gprs_rlcmac_tbf::t_start(enum tbf_timers t, uint32_t sec, uint32_t 
microsec, const char *reason, bool force,
                              const char *file, unsigned line)
 {
+       int current_fn = get_current_fn();
+
        if (t >= T_MAX) {
-               LOGPSRC(DTBF, LOGL_ERROR, file, line, "%s attempting to start 
unknown timer %s [%s]\n",
-                       tbf_name(this), get_value_string(tbf_timers_names, t), 
reason);
+               LOGPSRC(DTBF, LOGL_ERROR, file, line, "%s attempting to start 
unknown timer %s [%s], cur_fn=%d\n",
+                       tbf_name(this), get_value_string(tbf_timers_names, t), 
reason, current_fn);
                return;
        }
 
        if (!force && osmo_timer_pending(&T[t]))
                return;
 
-       LOGPSRC(DTBF, LOGL_DEBUG, file, line, "%s %sstarting timer %s [%s] with 
%u sec. %u microsec.\n",
+       LOGPSRC(DTBF, LOGL_DEBUG, file, line, "%s %sstarting timer %s [%s] with 
%u sec. %u microsec, cur_fn=%d\n",
             tbf_name(this), osmo_timer_pending(&T[t]) ? "re" : "",
-            get_value_string(tbf_timers_names, t), reason, sec, microsec);
+            get_value_string(tbf_timers_names, t), reason, sec, microsec, 
current_fn);
 
        T[t].data = this;
 
@@ -693,8 +695,8 @@
                T[t].cb = cb_T3195;
                break;
        default:
-               LOGPSRC(DTBF, LOGL_ERROR, file, line, "%s attempting to set 
callback for unknown timer %s [%s]\n",
-                    tbf_name(this), get_value_string(tbf_timers_names, t), 
reason);
+               LOGPSRC(DTBF, LOGL_ERROR, file, line, "%s attempting to set 
callback for unknown timer %s [%s], cur_fn=%d\n",
+                    tbf_name(this), get_value_string(tbf_timers_names, t), 
reason, current_fn);
        }
 
        osmo_timer_schedule(&T[t], sec, microsec);
@@ -1126,7 +1128,9 @@
 
 void gprs_rlcmac_tbf::handle_timeout()
 {
-       LOGPTBF(this, LOGL_DEBUG, "timer 0 expired.\n");
+       int current_fn = get_current_fn();
+
+       LOGPTBF(this, LOGL_DEBUG, "timer 0 expired. cur_fn=%d\n", current_fn);
 
        /* assignment */
        if ((state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a744dc5cd7c1de1baea13fffac026c83d091429
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: dexter <pma...@sysmocom.de>

Reply via email to