TBF: log timer override

Currently TBF support only single Txxxx timer so scheduling another
timer will cancel out the one which is already running. Until the proper
fix is in place, let's at least log this situation as error.

Note: cosmetic adjustement to test output is required - we do not report
restart of the same timer twice because "restarting" assumes it anyway.

Change-Id: I462464a1e6df937b72cad65d19cd48e95dc4db45
Related: OS#2407
This commit is contained in:
Max 2017-11-30 12:36:11 +01:00
parent 701afa4b3a
commit 59f50c2718
2 changed files with 218 additions and 218 deletions

View File

@ -531,13 +531,13 @@ const char *gprs_rlcmac_tbf::tbf_state_name[] = {
void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T,
unsigned int seconds, unsigned int microseconds)
{
if (!osmo_timer_pending(&tbf->timer))
LOGP(DRLCMAC, LOGL_DEBUG, "%s starting timer %u.\n",
tbf_name(tbf), T);
else
LOGP(DRLCMAC, LOGL_DEBUG, "%s restarting timer %u "
"while old timer %u pending \n",
tbf_name(tbf), T, tbf->T);
LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "%s %sstarting timer %u.",
tbf_name(tbf), osmo_timer_pending(&tbf->timer) ? "re" : "", T);
if (T != tbf->T && osmo_timer_pending(&tbf->timer))
LOGPC(DRLCMAC, LOGL_ERROR, " while old timer %u pending", tbf->T);
LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "\n");
tbf->T = T;
tbf->num_T_exp = 0;

File diff suppressed because it is too large Load Diff