Bluetooth: ATT: Fix notifying GATT on disconnection

Channel context was cleared before calling bt_gatt_disconnected
which resulted in passing NULL conn to it.

Change-Id: I486d1cf6662716584c2c973366a9c9654f499802
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
Szymon Janc 2016-02-16 14:04:31 +01:00 committed by Gerrit Code Review
parent 8ca1826bde
commit 7dc9210939
1 changed files with 1 additions and 1 deletions

View File

@ -1656,8 +1656,8 @@ static void bt_att_disconnected(struct bt_l2cap_chan *chan)
BT_DBG("chan %p cid 0x%04x", chan, chan->tx.cid);
memset(att, 0, sizeof(*att));
bt_gatt_disconnected(chan->conn);
memset(att, 0, sizeof(*att));
}
#if defined(CONFIG_BLUETOOTH_SMP)