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

Make TBF state private

Let's make sure no external function can mess with the TBF state.

Change-Id: I217f4c4bac21dd584c8682928a080a1a6e9507e1
---
M src/tbf.cpp
M src/tbf.h
2 files changed, 2 insertions(+), 5 deletions(-)


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

diff --git a/src/tbf.cpp b/src/tbf.cpp
index 7b609c8..549dfd5 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -165,7 +165,6 @@
        num_T_exp(0),
        fT(0),
        num_fT_exp(0),
-       state(GPRS_RLCMAC_NULL),
        was_releasing(0),
        upgrade_to_multislot(0),
        bts(bts_),
@@ -175,6 +174,7 @@
        m_ms(NULL),
        m_ta(GSM48_TA_INVALID),
        m_ms_class(0),
+       state(GPRS_RLCMAC_NULL),
        m_list(this),
        m_ms_list(this),
        m_egprs_enabled(false)
diff --git a/src/tbf.h b/src/tbf.h
index 80249df..a4b613a 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -261,10 +261,6 @@
                Meas();
        } meas;
 
-       /* these should become protected but only after gprs_rlcmac_data.c
-        * stops to iterate over all tbf in its current form */
-       enum gprs_rlcmac_tbf_state state;
-
        /* Remember if the tbf was in wait_release state when we want to
         * schedule a new dl assignment */
        uint8_t was_releasing;
@@ -302,6 +298,7 @@
        uint8_t m_ms_class;
 
 private:
+       enum gprs_rlcmac_tbf_state state;
        LListHead<gprs_rlcmac_tbf> m_list;
        LListHead<gprs_rlcmac_tbf> m_ms_list;
        bool m_egprs_enabled;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I217f4c4bac21dd584c8682928a080a1a6e9507e1
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max <msur...@sysmocom.de>

Reply via email to