Bluetooth: ATT: Update multiple read req object

Modifies ATT transport bt_att_read_mult_req type used in read multiple
request.
Internally now it's been declared as array of handles.
For ensuring validness of minimum PDU length being 4 octets wide for
multiple read request, new define is introduced and used instead of
type sizeof evaluation.

Change-Id: I8b0096497d456c0e6fa6b5b1eb88bb1b8079ae04
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This commit is contained in:
Arkadiusz Lichwa 2015-07-10 15:18:31 +02:00 committed by Anas Nashif
commit c8b27ab8a5
2 changed files with 3 additions and 3 deletions

View file

@ -1245,7 +1245,7 @@ static const struct {
{ BT_ATT_OP_READ_BLOB_REQ, att_read_blob_req,
sizeof(struct bt_att_read_blob_req) },
{ BT_ATT_OP_READ_MULT_REQ, att_read_mult_req,
sizeof(struct bt_att_read_mult_req) },
BT_ATT_READ_MULT_MIN_LEN_REQ },
{ BT_ATT_OP_READ_GROUP_REQ, att_read_group_req,
sizeof(struct bt_att_read_group_req) },
{ BT_ATT_OP_WRITE_REQ, att_write_req,

View file

@ -167,10 +167,10 @@ struct bt_att_read_blob_rsp {
} __packed;
/* Read Multiple Request */
#define BT_ATT_READ_MULT_MIN_LEN_REQ 0x04
#define BT_ATT_OP_READ_MULT_REQ 0x0e
struct bt_att_read_mult_req {
uint16_t handle1;
uint16_t handle2;
uint16_t handles[0];
} __packed;