mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
fix(ble/bluedroid): use valid ATT error for Read Multiple assembly failure
Return GATT_INVALID_HANDLE instead of GATT_NOT_FOUND when Read Multiple (Variable) response assembly fails, since 0x0A is not a valid ATT error for these PDUs per Core Spec Vol 3 Part F.
This commit is contained in:
@@ -342,7 +342,7 @@ static BOOLEAN process_read_multi_rsp (tGATT_SR_CMD *p_cmd, tGATT_STATUS status,
|
||||
}
|
||||
|
||||
} else {
|
||||
p_cmd->status = GATT_NOT_FOUND;
|
||||
p_cmd->status = GATT_INVALID_HANDLE;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ static BOOLEAN process_read_multi_rsp (tGATT_SR_CMD *p_cmd, tGATT_STATUS status,
|
||||
/* Sanity check on the buffer length */
|
||||
if (p_buf->len <= 1) {
|
||||
GATT_TRACE_ERROR("process_read_multi_rsp - nothing found!!");
|
||||
p_cmd->status = GATT_NOT_FOUND;
|
||||
p_cmd->status = GATT_INVALID_HANDLE;
|
||||
osi_free (p_buf);
|
||||
GATT_TRACE_DEBUG(" osi_free (p_buf)");
|
||||
} else if (p_cmd->p_rsp_msg != NULL) {
|
||||
@@ -443,7 +443,7 @@ static BOOLEAN process_read_multi_var_rsp (tGATT_SR_CMD *p_cmd, tGATT_STATUS sta
|
||||
p += len;
|
||||
p_buf->len += (2+len);
|
||||
} else {
|
||||
p_cmd->status = GATT_NOT_FOUND;
|
||||
p_cmd->status = GATT_INVALID_HANDLE;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -452,7 +452,7 @@ static BOOLEAN process_read_multi_var_rsp (tGATT_SR_CMD *p_cmd, tGATT_STATUS sta
|
||||
/* Sanity check on the buffer length */
|
||||
if (p_buf->len <= 1) {
|
||||
GATT_TRACE_ERROR("%s - nothing found!!", __func__);
|
||||
p_cmd->status = GATT_NOT_FOUND;
|
||||
p_cmd->status = GATT_INVALID_HANDLE;
|
||||
osi_free (p_buf);
|
||||
} else if (p_cmd->p_rsp_msg != NULL) {
|
||||
osi_free (p_buf);
|
||||
|
||||
Reference in New Issue
Block a user