This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-pcu/+/15424 )
Change subject: cosmetic: tbf: Rename T and N arrays
......................................................................
cosmetic: tbf: Rename T and N arrays
Those namings my collide with usual osmocom "T" variable name associated
to a timer number, which will be added in following patches.
Change-Id: Ic2b5068a4882e4a043bf81496be30a378fdb9a09
---
M src/tbf.cpp
M src/tbf.h
2 files changed, 20 insertions(+), 20 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 9856c7f..d3021e4 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -220,8 +220,8 @@
/* The classes of these members do not have proper constructors yet.
* Just set them to 0 like talloc_zero did */
memset(&pdch, 0, sizeof(pdch));
- memset(&T, 0, sizeof(T));
- memset(&N, 0, sizeof(N));
+ memset(&Tarr, 0, sizeof(Tarr));
+ memset(&Narr, 0, sizeof(Narr));
memset(&gsm_timer, 0, sizeof(gsm_timer));
m_rlc.init();
@@ -563,7 +563,7 @@
return;
}
- N[n] = 0;
+ Narr[n] = 0;
}
/* Increment counter and check for MAX value (return true if we hit it) */
@@ -577,7 +577,7 @@
return true;
}
- N[n]++;
+ Narr[n]++;
switch(n) {
case N3101:
@@ -595,7 +595,7 @@
return true;
}
- if (N[n] == chk) {
+ if (Narr[n] == chk) {
LOGPTBF(this, LOGL_NOTICE, "%s exceeded MAX (%u)\n",
get_value_string(tbf_counters_names, n), chk);
return true;
@@ -612,10 +612,10 @@
return;
}
- if (osmo_timer_pending(&T[t])) {
+ if (osmo_timer_pending(&Tarr[t])) {
LOGPTBF(this, LOGL_DEBUG, "stopping timer %s [%s]\n",
get_value_string(tbf_timers_names, t), reason);
- osmo_timer_del(&T[t]);
+ osmo_timer_del(&Tarr[t]);
}
}
@@ -625,11 +625,11 @@
uint8_t i;
if (t != T_MAX)
- return osmo_timer_pending(&T[t]);
+ return osmo_timer_pending(&Tarr[t]);
/* we don't start with T0 because it's internal timer which requires special handling */
for (i = T3169; i < T_MAX; i++)
- if (osmo_timer_pending(&T[i]))
+ if (osmo_timer_pending(&Tarr[i]))
return true;
return false;
@@ -672,37 +672,37 @@
return;
}
- if (!force && osmo_timer_pending(&T[t]))
+ if (!force && osmo_timer_pending(&Tarr[t]))
return;
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" : "",
+ tbf_name(this), osmo_timer_pending(&Tarr[t]) ? "re" : "",
get_value_string(tbf_timers_names, t), reason, sec, microsec, current_fn);
- T[t].data = this;
+ Tarr[t].data = this;
switch(t) {
case T0:
- T[t].cb = tbf_timer_cb;
+ Tarr[t].cb = tbf_timer_cb;
break;
case T3169:
- T[t].cb = cb_T3169;
+ Tarr[t].cb = cb_T3169;
break;
case T3191:
- T[t].cb = cb_T3191;
+ Tarr[t].cb = cb_T3191;
break;
case T3193:
- T[t].cb = cb_T3193;
+ Tarr[t].cb = cb_T3193;
break;
case T3195:
- T[t].cb = cb_T3195;
+ Tarr[t].cb = cb_T3195;
break;
default:
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);
+ osmo_timer_schedule(&Tarr[t], sec, microsec);
}
int gprs_rlcmac_tbf::check_polling(uint32_t fn, uint8_t ts,
diff --git a/src/tbf.h b/src/tbf.h
index 34e8101..16ccf43 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -370,8 +370,8 @@
LListHead<gprs_rlcmac_tbf> m_list;
LListHead<gprs_rlcmac_tbf> m_ms_list;
bool m_egprs_enabled;
- struct osmo_timer_list T[T_MAX];
- uint8_t N[N_MAX];
+ struct osmo_timer_list Tarr[T_MAX];
+ uint8_t Narr[N_MAX];
mutable char m_name_buf[60];
};
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/15424
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ic2b5068a4882e4a043bf81496be30a378fdb9a09
Gerrit-Change-Number: 15424
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190906/3bad0203/attachment.htm>