edge: Add m_egprs_enabled and related methods to TBF
Add the following methods to gprs_rlcmac_tbf:
- is_egprs_enabled
- enable_egprs
- disable_egprs
Also show the value of the flag in name() by displaying "EGPRS" if
it is set.
Sponsored-by: On-Waves ehf
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 0eb9983..0fc6edf 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -74,7 +74,8 @@
m_ms(NULL),
m_ta(0),
m_ms_class(0),
- m_ms_list(this)
+ m_ms_list(this),
+ m_egprs_enabled(false)
{
/* The classes of these members do not have proper constructors yet.
* Just set them to 0 like talloc_zero did */
@@ -1060,10 +1061,11 @@
return "(no TBF)";
snprintf(m_name_buf, sizeof(m_name_buf) - 1,
- "TBF(TFI=%d TLLI=0x%08x DIR=%s STATE=%s)",
+ "TBF(TFI=%d TLLI=0x%08x DIR=%s STATE=%s%s)",
m_tfi, tlli(),
direction == GPRS_RLCMAC_UL_TBF ? "UL" : "DL",
- state_name()
+ state_name(),
+ is_egprs_enabled() ? " EGPRS" : ""
);
m_name_buf[sizeof(m_name_buf) - 1] = '\0';
return m_name_buf;