mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/btdm_respond_error_when_receives_unsupported_request' into 'master'
component/bt: Fix bug: Respond with the Error Response when receiving a request… See merge request idf/esp-idf!2591
This commit is contained in:
commit
34797d8d52
@ -979,7 +979,12 @@ void gatt_data_process (tGATT_TCB *p_tcb, BT_HDR *p_buf)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (op_code & GATT_COMMAND_FLAG) {
|
||||
GATT_TRACE_ERROR ("ATT - Rcvd L2CAP data, unknown cmd: 0x%x\n", op_code);
|
||||
} else {
|
||||
GATT_TRACE_ERROR ("ATT - Rcvd L2CAP data, unknown req: 0x%x\n", op_code);
|
||||
gatt_send_error_rsp (p_tcb, GATT_REQ_NOT_SUPPORTED, op_code, 0, FALSE);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
GATT_TRACE_ERROR ("invalid data length, ignore\n");
|
||||
|
@ -111,6 +111,7 @@ typedef UINT8 tGATT_STATUS;
|
||||
#define GATT_SIGN_CMD_WRITE 0xD2 /* changed in V4.0 1101-0010 (signed write) see write cmd above*/
|
||||
#define GATT_OP_CODE_MAX GATT_HANDLE_VALUE_CONF + 1 /* 0x1E = 30 + 1 = 31*/
|
||||
|
||||
#define GATT_COMMAND_FLAG 0x40 /* Command Flag: set to one means commond */
|
||||
|
||||
#define GATT_HANDLE_IS_VALID(x) ((x) != 0)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user