diff --git a/src/tbf.cpp b/src/tbf.cpp index 74c790ca..35bd81d0 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -544,7 +544,7 @@ void gprs_rlcmac_tbf::t_start(enum tbf_timers t, int T, const char *reason, bool } int gprs_rlcmac_tbf::check_polling(uint32_t fn, uint8_t ts, - uint32_t *poll_fn_, unsigned int *rrbp_) + uint32_t *poll_fn_, unsigned int *rrbp_) const { uint32_t new_poll_fn = next_fn(fn, 13); @@ -1066,7 +1066,7 @@ int gprs_rlcmac_tbf::establish_dl_tbf_on_pacch() return 0; } -const char *tbf_name(gprs_rlcmac_tbf *tbf) +const char *tbf_name(const gprs_rlcmac_tbf *tbf) { return tbf ? tbf->name() : "(no TBF)"; } diff --git a/src/tbf.h b/src/tbf.h index a2c47477..1d28afbb 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -190,7 +190,7 @@ enum tbf_counters { /* TBF counters from 3GPP TS 44.060 ยง13.4 */ extern "C" { #endif struct gprs_rlcmac_tbf; -const char *tbf_name(struct gprs_rlcmac_tbf *tbf); +const char *tbf_name(const struct gprs_rlcmac_tbf *tbf); enum gprs_rlcmac_tbf_state tbf_state(const struct gprs_rlcmac_tbf *tbf); enum gprs_rlcmac_tbf_direction tbf_direction(const struct gprs_rlcmac_tbf *tbf); void tbf_set_ms(struct gprs_rlcmac_tbf *tbf, struct GprsMs *ms); @@ -262,7 +262,7 @@ struct gprs_rlcmac_tbf { int establish_dl_tbf_on_pacch(); int check_polling(uint32_t fn, uint8_t ts, - uint32_t *poll_fn, unsigned int *rrbp); + uint32_t *poll_fn, unsigned int *rrbp) const; void set_polling(uint32_t poll_fn, uint8_t ts, enum gprs_rlcmac_tbf_poll_type t); void poll_timeout();