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/.
Max gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/5339
TBF-DL: mark rcvd_dl_ack() parameters as boolean
The final(_ack) parameter of rcvd_dl_ack() only used as boolean - mark
it as such.
Change-Id: Icc4d68f049a45d4b42c5594f50594ff0d44c1bac
---
M src/tbf.h
M src/tbf_dl.cpp
M tests/tbf/TbfTest.cpp
3 files changed, 10 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/39/5339/1
diff --git a/src/tbf.h b/src/tbf.h
index 3b48238..f324cba 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -427,8 +427,8 @@
const uint16_t pdu_delay_csec,
const uint8_t *data, const uint16_t len);
- int rcvd_dl_ack(uint8_t final, uint8_t ssn, uint8_t *rbb);
- int rcvd_dl_ack(uint8_t final_ack, unsigned first_bsn, struct bitvec *rbb);
+ int rcvd_dl_ack(bool final, uint8_t ssn, uint8_t *rbb);
+ int rcvd_dl_ack(bool final_ack, unsigned first_bsn, struct bitvec *rbb);
struct msgb *create_dl_acked_block(uint32_t fn, uint8_t ts);
void trigger_ass(struct gprs_rlcmac_tbf *old_tbf);
void clear_poll_timeout_flag();
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 73708f5..ad2f17f 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -1168,7 +1168,7 @@
return 0;
}
-int gprs_rlcmac_dl_tbf::rcvd_dl_ack(uint8_t final_ack, unsigned first_bsn,
+int gprs_rlcmac_dl_tbf::rcvd_dl_ack(bool final_ack, unsigned first_bsn,
struct bitvec *rbb)
{
int rc;
@@ -1188,7 +1188,7 @@
return rc;
}
-int gprs_rlcmac_dl_tbf::rcvd_dl_ack(uint8_t final_ack, uint8_t ssn, uint8_t *rbb)
+int gprs_rlcmac_dl_tbf::rcvd_dl_ack(bool final_ack, uint8_t ssn, uint8_t *rbb)
{
LOGP(DRLCMACDL, LOGL_DEBUG, "%s downlink acknowledge\n", tbf_name(this));
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 9a5ce30..6ae0207 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -267,7 +267,7 @@
/* Queue a final ACK */
memset(rbb, 0, sizeof(rbb));
/* Receive a final ACK */
- dl_tbf->rcvd_dl_ack(1, 1, rbb);
+ dl_tbf->rcvd_dl_ack(true, 1, rbb);
/* Clean up and ensure tbfs are in the correct state */
OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE));
@@ -348,12 +348,12 @@
/* ACK all blocks */
memset(rbb, 0xff, sizeof(rbb));
- RCV_ACK(0, dl_tbf, rbb); /* Receive an ACK */
+ RCV_ACK(false, dl_tbf, rbb); /* Receive an ACK */
/* Force sending of a single block containing an LLC dummy command */
request_dl_rlc_block(dl_tbf, &fn);
- RCV_ACK(0, dl_tbf, rbb); /* Receive an ACK */
+ RCV_ACK(false, dl_tbf, rbb); /* Receive an ACK */
/* Timeout (make sure fn % 52 remains valid) */
fn += 52 * ((msecs_to_frames(bts->dl_tbf_idle_msec + 100) + 51)/ 52);
@@ -361,7 +361,7 @@
OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_FINISHED));
- RCV_ACK(1, dl_tbf, rbb); /* Receive a final ACK */
+ RCV_ACK(true, dl_tbf, rbb); /* Receive a final ACK */
/* Clean up and ensure tbfs are in the correct state */
OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE));
@@ -2695,7 +2695,7 @@
OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_FLOW));
- RCV_ACK(1, dl_tbf, rbb); /* Receive a final ACK */
+ RCV_ACK(true, dl_tbf, rbb); /* Receive a final ACK */
/* Clean up and ensure tbfs are in the correct state */
OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE));
@@ -2744,7 +2744,7 @@
{
uint8_t rbb[64/8];
- RCV_ACK(1, dl_tbf, rbb); /* Receive a final ACK */
+ RCV_ACK(true, dl_tbf, rbb); /* Receive a final ACK */
/* Clean up and ensure tbfs are in the correct state */
OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE));
--
To view, visit https://gerrit.osmocom.org/5339
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc4d68f049a45d4b42c5594f50594ff0d44c1bac
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>