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 submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/25772 ) Change subject: Return void in tbf_assign_control_ts() ...................................................................... Return void in tbf_assign_control_ts() This operation cannot fail, hence let's simplify code. Change-Id: I5675df4b6309d680d1d5e2dbea87991468f30630 --- M src/tbf.cpp M src/tbf.h 2 files changed, 4 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/tbf.cpp b/src/tbf.cpp index 153ba80..af15c72 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -326,7 +326,7 @@ return 0; } -int tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf) +void tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf) { if (tbf->control_ts == TBF_CONTROL_TS_UNSET) LOGPTBF(tbf, LOGL_INFO, "Setting Control TS %d\n", @@ -335,8 +335,6 @@ LOGPTBF(tbf, LOGL_INFO, "Changing Control TS %d -> %d\n", tbf->control_ts, tbf->first_common_ts); tbf->control_ts = tbf->first_common_ts; - - return 0; } void gprs_rlcmac_tbf::n_reset(enum tbf_counters n) @@ -660,13 +658,8 @@ bts_do_rate_ctr_inc(bts, CTR_TBF_ALLOC_FAIL); return -1; } - /* assign control ts */ - rc = tbf_assign_control_ts(this); - /* if no resource */ - if (rc < 0) { - LOGPTBF(this, LOGL_ERROR, "Failed to assign control TS\n"); - return -1; - } + /* assign initial control ts */ + tbf_assign_control_ts(this); /* set timestamp */ osmo_clock_gettime(CLOCK_MONOTONIC, &meas.rssi_tv); diff --git a/src/tbf.h b/src/tbf.h index 05beed5..cab9364 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -142,7 +142,7 @@ bool tbf_is_tfi_assigned(const struct gprs_rlcmac_tbf *tbf); uint8_t tbf_tfi(const struct gprs_rlcmac_tbf *tbf); bool tbf_is_egprs_enabled(const struct gprs_rlcmac_tbf *tbf); -int tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf); +void tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf); int tbf_check_polling(const struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts, uint32_t *poll_fn, unsigned int *rrbp); void tbf_set_polling(struct gprs_rlcmac_tbf *tbf, uint32_t new_poll_fn, uint8_t ts, enum pdch_ulc_tbf_poll_reason t); void tbf_poll_timeout(struct gprs_rlcmac_tbf *tbf, struct gprs_rlcmac_pdch *pdch, uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/25772 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I5675df4b6309d680d1d5e2dbea87991468f30630 Gerrit-Change-Number: 25772 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211013/2aa49157/attachment.htm>