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 2020/03/12 13:03:58 UTC
[mynewt-nimble] 03/03: nimble/l2cap: Move proc initialization
Without that identifier was incorrectly set to 0
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 56229549cf0cbd0819307936aa15075dc0abac64
Author: Ćukasz Rymanowski <lu...@codecoup.pl>
AuthorDate: Wed Mar 11 20:49:25 2020 +0100
nimble/l2cap: Move proc initialization
Without that identifier was incorrectly set to 0
---
nimble/host/src/ble_l2cap_sig.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/nimble/host/src/ble_l2cap_sig.c b/nimble/host/src/ble_l2cap_sig.c
index 165af91..bb4d8a5 100644
--- a/nimble/host/src/ble_l2cap_sig.c
+++ b/nimble/host/src/ble_l2cap_sig.c
@@ -1368,6 +1368,10 @@ ble_l2cap_sig_ecoc_connect(uint16_t conn_handle, uint16_t psm, uint16_t mtu,
return BLE_HS_ENOMEM;
}
+ proc->op = BLE_L2CAP_SIG_PROC_OP_CONNECT;
+ proc->id = ble_l2cap_sig_next_id();
+ proc->conn_handle = conn_handle;
+
req = ble_l2cap_sig_cmd_get(BLE_L2CAP_SIG_OP_CREDIT_CONNECT_REQ, proc->id,
sizeof(*req) + num * sizeof(uint16_t), &txom);
if (!req) {
@@ -1396,10 +1400,6 @@ ble_l2cap_sig_ecoc_connect(uint16_t conn_handle, uint16_t psm, uint16_t mtu,
}
proc->connect.chan_cnt = num;
- proc->op = BLE_L2CAP_SIG_PROC_OP_CONNECT;
- proc->id = ble_l2cap_sig_next_id();
- proc->conn_handle = conn_handle;
-
req->psm = htole16(psm);
req->mtu = htole16(chan->coc_rx.mtu);
req->mps = htole16(chan->my_mtu);