Bluetooth: Fix using wrong PDU in handlers
Both Write Command and Signed Write command should use their respective packed struct. Change-Id: Id786d1e0ee0327f662c68fa1d2f3d3bf19a237fc Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
0b4413d607
commit
09f8409bfe
2 changed files with 3 additions and 3 deletions
|
@ -471,7 +471,7 @@ static void att_exec_write_req(struct bt_conn *conn, struct bt_buf *data)
|
|||
|
||||
static void att_write_cmd(struct bt_conn *conn, struct bt_buf *data)
|
||||
{
|
||||
struct bt_att_write_req *req;
|
||||
struct bt_att_write_cmd *req;
|
||||
uint16_t handle;
|
||||
|
||||
if (data->len < sizeof(*req)) {
|
||||
|
@ -489,7 +489,7 @@ static void att_write_cmd(struct bt_conn *conn, struct bt_buf *data)
|
|||
|
||||
static void att_signed_write_cmd(struct bt_conn *conn, struct bt_buf *data)
|
||||
{
|
||||
struct bt_att_write_req *req;
|
||||
struct bt_att_signed_write_cmd *req;
|
||||
uint16_t handle;
|
||||
|
||||
if (data->len < sizeof(*req) + sizeof(struct bt_att_signature)) {
|
||||
|
|
|
@ -281,7 +281,7 @@ struct bt_att_write_cmd {
|
|||
|
||||
/* Signed Write Command */
|
||||
#define BT_ATT_OP_SIGNED_WRITE_CMD 0xd2
|
||||
struct bt_att_signed_write_req {
|
||||
struct bt_att_signed_write_cmd {
|
||||
uint16_t handle;
|
||||
uint8_t value[0];
|
||||
} PACK_STRUCT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue