Skip to content

Commit

Permalink
host/l2cap: fix typo in the macro's name
Browse files Browse the repository at this point in the history
Changed from 'BLE_L2CAP_ERR_RECONFIG_UNACCAPTED_PARAM' to 'BLE_L2CAP_ERR_RECONFIG_UNACCEPTED_PARAM'.
  • Loading branch information
wpiet authored and sjanc committed Jul 3, 2023
1 parent 326fb77 commit 5923735
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nimble/host/include/host/ble_l2cap.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ struct ble_hs_conn;
#define BLE_L2CAP_ERR_RECONFIG_REDUCTION_MTU_NOT_ALLOWED 0x0001
#define BLE_L2CAP_ERR_RECONFIG_REDUCTION_MPS_NOT_ALLOWED 0x0002
#define BLE_L2CAP_ERR_RECONFIG_INVALID_DCID 0x0003
#define BLE_L2CAP_ERR_RECONFIG_UNACCAPTED_PARAM 0x0004
#define BLE_L2CAP_ERR_RECONFIG_UNACCEPTED_PARAM 0x0004

#define BLE_L2CAP_EVENT_COC_CONNECTED 0
#define BLE_L2CAP_EVENT_COC_DISCONNECTED 1
Expand Down
6 changes: 3 additions & 3 deletions nimble/host/src/ble_l2cap_sig.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,14 +795,14 @@ ble_l2cap_sig_credit_base_reconfig_req_rx(uint16_t conn_handle,
}

if (hdr->length <= sizeof(*req)) {
rsp->result = htole16(BLE_L2CAP_ERR_RECONFIG_UNACCAPTED_PARAM);
rsp->result = htole16(BLE_L2CAP_ERR_RECONFIG_UNACCEPTED_PARAM);
goto failed;
}

req = (struct ble_l2cap_sig_credit_base_reconfig_req *)(*om)->om_data;

if ((req->mps < BLE_L2CAP_ECOC_MIN_MTU) || (req->mtu < BLE_L2CAP_ECOC_MIN_MTU)) {
rsp->result = htole16(BLE_L2CAP_ERR_RECONFIG_UNACCAPTED_PARAM);
rsp->result = htole16(BLE_L2CAP_ERR_RECONFIG_UNACCEPTED_PARAM);
goto failed;
}

Expand All @@ -811,7 +811,7 @@ ble_l2cap_sig_credit_base_reconfig_req_rx(uint16_t conn_handle,

cid_cnt = (hdr->length - sizeof(*req)) / sizeof(uint16_t);
if (cid_cnt > BLE_L2CAP_MAX_COC_CONN_REQ) {
rsp->result = htole16(BLE_L2CAP_ERR_RECONFIG_UNACCAPTED_PARAM);
rsp->result = htole16(BLE_L2CAP_ERR_RECONFIG_UNACCEPTED_PARAM);
goto failed;
}

Expand Down

0 comments on commit 5923735

Please sign in to comment.