You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2019/10/04 16:53:11 UTC
[mynewt-nimble] branch master updated: nimble/ll: Remove
unnecessary code
This is an automated email from the ASF dual-hosted git repository.
wes3 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new d6710d6 nimble/ll: Remove unnecessary code
new f7ade6a Merge pull request #597 from wes3/ll_conn_fix
d6710d6 is described below
commit d6710d6a03d87d6af0a9762f7a2cec808ece6390
Author: Will San Filippo <wi...@juul.com>
AuthorDate: Thu Oct 3 17:41:27 2019 -0700
nimble/ll: Remove unnecessary code
While reviewing code noticed that there was no need to check for
not receiving a terminate indication as that case is already
checked and could thus never be true. Removed the code that was
not needed.
---
nimble/controller/src/ble_ll_conn.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/nimble/controller/src/ble_ll_conn.c b/nimble/controller/src/ble_ll_conn.c
index 416b340..30bb3d9 100644
--- a/nimble/controller/src/ble_ll_conn.c
+++ b/nimble/controller/src/ble_ll_conn.c
@@ -811,7 +811,7 @@ ble_ll_conn_tx_data_pdu(struct ble_ll_conn_sm *connsm)
if (connsm->csmflags.cfbit.terminate_ind_rxd) {
/* We just received terminate indication.
- * Just sent empty packet as an ACK
+ * Just send empty packet as an ACK
*/
CONN_F_EMPTY_PDU_TXD(connsm) = 1;
goto conn_tx_pdu;
@@ -918,8 +918,7 @@ ble_ll_conn_tx_data_pdu(struct ble_ll_conn_sm *connsm)
* Set the more data data flag if we have more data to send and we
* have not been asked to terminate
*/
- if ((nextpkthdr || ((cur_offset + cur_txlen) < pktlen)) &&
- !connsm->csmflags.cfbit.terminate_ind_rxd) {
+ if (nextpkthdr || ((cur_offset + cur_txlen) < pktlen)) {
/* Get next event time */
next_event_time = ble_ll_conn_get_next_sched_time(connsm);