aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-05-31 12:52:41 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2023-05-31 12:54:14 +0200
commita9b844d346b8b3f7441a16958416d7d527b42a30 (patch)
treec6a2a35488acd771d37c6c00cd425efed0eda2b0 /src
parent2fc67e252cfc4277d6ba93d6a6dd44c12c6e2eaa (diff)
tbf: Improve TBF name description in logs
Change format to print the state at the end, to resemble more the same format used by FSMs. Furthermore, by moving it at the end, print it only when "enclousure" is requested, aka when not requested by FSM to update its internal name. The consequence of this logc is that log lines printed from FSM don't end up with the same state string printed twice in different places. While at it, shorten the EGPRS/GPRS indicator to one character, which should be understandable enough since it matches what's usually seen in mobile phones to signal one or another. Change-Id: I86b5f042fae77721b22fc026228677bd56768ba9
Diffstat (limited to 'src')
-rw-r--r--src/tbf.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 7f549c72..83b3b862 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -596,8 +596,7 @@ const char *gprs_rlcmac_tbf::name(bool enclousure) const
OSMO_STRBUF_PRINTF(sb, ":TFI-%u-%u-%d",
this->trx->bts->nr, this->trx->trx_no, tfi);
}
- OSMO_STRBUF_PRINTF(sb, ":STATE-%s:%sGPRS",
- state_name(), is_egprs_enabled() ? "E" : "");
+ OSMO_STRBUF_PRINTF(sb, ":%c", is_egprs_enabled() ? 'E' : 'G');
if (m_ms) {
uint32_t tlli = ms_tlli(m_ms);
if (ms_imsi_is_valid(m_ms))
@@ -606,7 +605,7 @@ const char *gprs_rlcmac_tbf::name(bool enclousure) const
OSMO_STRBUF_PRINTF(sb, ":TLLI-0x%08x", tlli);
}
if (enclousure)
- OSMO_STRBUF_PRINTF(sb, ")");
+ OSMO_STRBUF_PRINTF(sb, "){%s}", state_name());
return m_name_buf;
}