This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/25050 ) Change subject: Put dl_tbf::cleanup into destructor ...................................................................... Put dl_tbf::cleanup into destructor It's fine to always attemt dropping the timer since it's set up in the constructor. This also drps the double function call abort()+cleanup() which is confusing. Change-Id: Ia2aaa43bd8faacf09fe4b36b11b38022bea7a59c --- M src/tbf.cpp M src/tbf_dl.cpp M src/tbf_dl.h 3 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/50/25050/1 diff --git a/src/tbf.cpp b/src/tbf.cpp index 2529eaa..579a46d 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -293,7 +293,6 @@ gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(tbf); dl_tbf->abort(); - dl_tbf->cleanup(); } LOGPTBF(tbf, LOGL_INFO, "free\n"); diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index f264cfc..2154ed6 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -177,6 +177,12 @@ return tbf; } +gprs_rlcmac_dl_tbf::~gprs_rlcmac_dl_tbf() +{ + osmo_timer_del(&m_llc_timer); + /* ~gprs_rlcmac_dl_tbf() is called automatically upon return */ +} + gprs_rlcmac_dl_tbf::gprs_rlcmac_dl_tbf(struct gprs_rlcmac_bts *bts_, GprsMs *ms) : gprs_rlcmac_tbf(bts_, ms, GPRS_RLCMAC_DL_TBF), m_tx_counter(0), @@ -191,11 +197,6 @@ osmo_timer_setup(&m_llc_timer, llc_timer_cb, this); } -void gprs_rlcmac_dl_tbf::cleanup() -{ - osmo_timer_del(&m_llc_timer); -} - void gprs_rlcmac_dl_tbf::start_llc_timer() { if (the_pcu->vty.llc_idle_ack_csec > 0) { diff --git a/src/tbf_dl.h b/src/tbf_dl.h index af82a0c..6fddeb5 100644 --- a/src/tbf_dl.h +++ b/src/tbf_dl.h @@ -42,8 +42,8 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf { gprs_rlcmac_dl_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms); + ~gprs_rlcmac_dl_tbf(); gprs_rlc_window *window(); - void cleanup(); int append_data(uint16_t pdu_delay_csec, const uint8_t *data, uint16_t len); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/25050 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ia2aaa43bd8faacf09fe4b36b11b38022bea7a59c Gerrit-Change-Number: 25050 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210726/c7e5c958/attachment.htm>