Bluetooth: Fix setting proper conn data for read by type rsp

Att data structure passed to read_type callback wasn't set properly
with connection data. This cause parsing att struct set to 0 (casted
in cb, set in att_read_type_rsp). Wrong att data caused parsing wrong
mtu size and whole conn structure.

Change-Id: Ib0aa4b8edca4965afd746e7186a08cfa34e62cf3
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
This commit is contained in:
Grzegorz Kolodziejczyk 2015-09-03 14:05:02 +02:00 committed by Anas Nashif
commit e989683d83

View file

@ -552,6 +552,7 @@ static uint8_t att_read_type_rsp(struct bt_conn *conn, struct bt_uuid *uuid,
return BT_ATT_ERR_UNLIKELY;
}
data.conn = conn;
data.uuid = uuid;
data.rsp = bt_buf_add(data.buf, sizeof(*data.rsp));
data.rsp->len = 0;