pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/29923 )


Change subject: ul_tbf: Define m_contention_resolution_done as bool
......................................................................

ul_tbf: Define m_contention_resolution_done as bool

Change-Id: Ief048cc1b5e8a18ceaeb5432415d14f5ef7ee0ea
---
M src/tbf_ul.cpp
M src/tbf_ul.h
M tests/alloc/AllocTest.cpp
3 files changed, 5 insertions(+), 5 deletions(-)



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

diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index 3988176..7189b6f 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -164,7 +164,7 @@
                return NULL;
        }
        /* Contention resolution is considered to be done since TLLI is known 
in MS: */
-       tbf->m_contention_resolution_done = 1;
+       tbf->m_contention_resolution_done = true;
        osmo_fsm_inst_dispatch(tbf->state_fsm.fi, TBF_EV_ASSIGN_ADD_PACCH, 
NULL);

        return tbf;
@@ -237,7 +237,7 @@
 gprs_rlcmac_ul_tbf::gprs_rlcmac_ul_tbf(struct gprs_rlcmac_bts *bts_, GprsMs 
*ms) :
        gprs_rlcmac_tbf(bts_, ms, GPRS_RLCMAC_UL_TBF),
        m_rx_counter(0),
-       m_contention_resolution_done(0),
+       m_contention_resolution_done(false),
        m_ul_gprs_ctrs(NULL),
        m_ul_egprs_ctrs(NULL)
 {
@@ -327,7 +327,7 @@

        /* now we must set this flag, so we are allowed to assign downlink
         * TBF on PACCH. it is only allowed when TLLI is acknowledged. */
-       m_contention_resolution_done = 1;
+       m_contention_resolution_done = true;

        bts_do_rate_ctr_inc(bts, 
CTR_IMMEDIATE_ASSIGN_UL_TBF_CONTENTION_RESOLUTION_SUCCESS);
 }
diff --git a/src/tbf_ul.h b/src/tbf_ul.h
index 301c52a..59e5d66 100644
--- a/src/tbf_ul.h
+++ b/src/tbf_ul.h
@@ -98,7 +98,7 @@
         */
        int32_t m_rx_counter; /* count all received blocks */
        uint8_t m_usf[8];       /* list USFs per PDCH (timeslot), initialized 
to USF_INVALID */
-       uint8_t m_contention_resolution_done; /* set after done */
+       bool m_contention_resolution_done; /* set after done */

        struct rate_ctr_group *m_ul_gprs_ctrs;
        struct rate_ctr_group *m_ul_egprs_ctrs;
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp
index 5e1f06d..3426f23 100644
--- a/tests/alloc/AllocTest.cpp
+++ b/tests/alloc/AllocTest.cpp
@@ -280,7 +280,7 @@
                return false;

        ul_tbf->update_ms(0x23, GPRS_RLCMAC_UL_TBF);
-       ul_tbf->m_contention_resolution_done = 1;
+       ul_tbf->m_contention_resolution_done = true;

        dump_assignment(ul_tbf, "UL", verbose);


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29923
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ief048cc1b5e8a18ceaeb5432415d14f5ef7ee0ea
Gerrit-Change-Number: 29923
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to