You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ry...@apache.org on 2018/11/05 11:31:13 UTC
[mynewt-nimble] 04/04: nimble/ll: Fix handling TERMINATE_IND
This is an automated email from the ASF dual-hosted git repository.
rymek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit 44374ce86ca0063adb1691cb4e225c0fe7b010af
Author: Ćukasz Rymanowski <lu...@codecoup.pl>
AuthorDate: Mon Nov 5 11:43:03 2018 +0100
nimble/ll: Fix handling TERMINATE_IND
When being master, we need to takie into acount MD flag when ACKing
TERMINATE_IND packet. Spec does not says that ACK shall be in the same
Connection Event
This fixes: LL/CON/INI/BV-06 and LL/CON/INI/BV-07
---
nimble/controller/src/ble_ll_conn.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/nimble/controller/src/ble_ll_conn.c b/nimble/controller/src/ble_ll_conn.c
index 4b6704d..26090e5 100644
--- a/nimble/controller/src/ble_ll_conn.c
+++ b/nimble/controller/src/ble_ll_conn.c
@@ -3924,8 +3924,9 @@ chk_rx_terminate_ind:
&& (rx_pyld_len == (1 + BLE_LL_CTRL_TERMINATE_IND_LEN))) {
connsm->csmflags.cfbit.terminate_ind_rxd = 1;
connsm->rxd_disconnect_reason = rxbuf[3];
- reply = 1;
- } else if (connsm->conn_role == BLE_LL_CONN_ROLE_MASTER) {
+ }
+
+ if (connsm->conn_role == BLE_LL_CONN_ROLE_MASTER) {
reply = CONN_F_LAST_TXD_MD(connsm) || (hdr_byte & BLE_LL_DATA_HDR_MD_MASK);
} else {
/* A slave always replies */